Sunday, November 20, 2011

8051 interfacing with DC motor

8051 interfacing with DC motor
fig shows interfacing connection.Below is the basic program

; 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            ;




4 comments:

  1. Kindly tell me how to programm stepper motor for analog clock....PlZ

    ReplyDelete
  2. Please if possible reply me with my email

    ReplyDelete
  3. Please if possible reply me with my email

    ReplyDelete
  4. Kindly tell me how to programm stepper motor for analog clock....PlZ

    ReplyDelete