Micro processor Lab Manual / Interface a stepper motor with 8085

Program Name

Write a Assembly Language Program for Interface a stepper motor with 8085 .
Theory
Instruction Mnemonic Operand Comments
MVI A,80 Load accumulator with 80H to configure CWR of 8255.
OUT CWR Configure CWR to display output with accumulator value. i.e 80
MVI A,88H To make a complete 360 rotation we need ‘1’ at D7 and D3….pass 88H.
OUT PA Send the value 88H through output port A.(which is displayed on screen as single dot).
CALL DLY Call delay to halt the motor after half rotation
RLC Rotate the bits to the left
JMP XX Jump back to send the value through output to continue the rotation


Delay Code
Instruction Mnemonic Operand Comments
PUSH PSW Initialize process status word.
LXI D,FFFF Initialize D register with maximum 16 bit value.
DCX D Decrement D.
MOV A,D Move the value of D into accumulator.
DRA E Perform OR operation on accumulator and E to decrement E.
JNZ YY Jump if the value at D is not zero.
POP PSW Remove value from process status word.
RET Return back to main routine.
Program Code


Online compiler for 8085 Microprocess Compiler


Home     Back