Professional Documents
Culture Documents
Stepper Motor With 8051 Microcontroller.: By: Prof. Amit N Kshirsagar
Stepper Motor With 8051 Microcontroller.: By: Prof. Amit N Kshirsagar
ORG 0000h
SJMP 0030H
ORG 0030H
MOV P1, #80H ; Initialise port 1 // 1000 0000
ACALL DELAY ; Delay
START: MOV DPTR,#FORWARD ; Load forward
direction table Address
MOV R7, #08H ; Steps
NEXT: CLR A
MOVC A,@A+DPTR ; Initialise A for signal.
INC DPTR
MOV P1,A ; Out stepper signal to p1
ACALL DELAY
DEC R7
CJNE R7,#00,NEXT ; keep in step loop
SJMP START ; keep in continuous loop
Code: Delay Subroutine