Dr. N. Karuppiah & Dr. S.
Ravivarman
Example Programs
ALP to generate Square Wave
START : MVI A, 00
OUT C0H
CALL DELAY
MVI A, FF
OUT COH
CALL DELAY
JMP START
DELAY : MVI B, FF
L1 : DCR B
JNZ L1
RET
ALP to generate Saw tooth Wave
START : MVI A, 00
L1 : OUT C0
INR A JNZ L1
JMP START
ALP to generate triangular wave
START : MVI A, 00H
L1 : OUT C0
INR A
JNZ L1
MVI A, 0FFH
L2 : OUT C0
DCR A
JNZ L2
JMP START
2.8 Stepper Motor Interfacing
A stepper motor is a brushless, synchronous electric motor that converts
digital pulses into mechanical shaft rotation. Every revolution of the stepper
motor is divided into a discrete number of steps, and the motor must be sent a
separate pulse for each step.
84