8051 interfacing with DC motor |
; P1.0 CONNECTED TO ENABLE
; P1.1 CONNECTED TO INPUT 1
; P1.2 CONNECTED TO INPUT 2
; ASSUME P2.1 BEING CONNECTED TO SWITCH SW
; THIS PROGRAM WILL ROTATE DC MOTOR CLOCKWISE SW = 0
; AND COUNTER CLOCKWISE WILL BE ROTATION OF DC MOTOR SW = 1
ORG 0000H ;
MAIN :
CLR P1.0 ;
CLR P1.1 ;
CLR P1.2 ;
SETB P2.1 ;
MONITOR :
SETB P1.0 ; ENABLE CHIP
JNB P2.1, CLOCKWISE ; JUMP WHEN SW = 0
COUNTERCLOCKWISE :
CLR P1.1 ;
SETB P1.2 ; TURN MOTOR COUNTERCLOCKWISE
CLOCKWISE :
SETB P1.1 ;
CLR P1.2 ; TURN MOTOR CLOCKWISE
SJMP MONITOR ;
END ;
Kindly tell me how to programm stepper motor for analog clock....PlZ
ReplyDeletePlease if possible reply me with my email
ReplyDeletePlease if possible reply me with my email
ReplyDeleteKindly tell me how to programm stepper motor for analog clock....PlZ
ReplyDelete