niranjan23
Member level 5
- Joined
- Jan 22, 2012
- Messages
- 94
- Helped
- 3
- Reputation
- 6
- Reaction score
- 2
- Trophy points
- 1,288
- Activity points
- 2,109
hello
I am doing bi-directional DC motor control circuit using AT89S51 , I used 2 push button switches for Clockwise and Anti-clockwise
the program and circuit for this is given at the end of the Thread
My problem is when I push the button for clock-wise, motor is keep rotating
I want ,when I press the button motor is rotate and when I leave the button motor stop rotating...
tell me what changes i have to do...???
Program
org 0000h
mov p1,#00h/////Intial value
mov p3,#00h//// make P3 as output
main:mov a,p1
cjne a,#01h,go1//////makes the motor run clockwise
mov p3,#01h
go1:cjne a,#02h,go2/////makes the motor to run anti clockwise
mov p3,#02h
go2:sjmp main
end
Circuit diagram
I am doing bi-directional DC motor control circuit using AT89S51 , I used 2 push button switches for Clockwise and Anti-clockwise
the program and circuit for this is given at the end of the Thread
My problem is when I push the button for clock-wise, motor is keep rotating
I want ,when I press the button motor is rotate and when I leave the button motor stop rotating...
tell me what changes i have to do...???
Program
org 0000h
mov p1,#00h/////Intial value
mov p3,#00h//// make P3 as output
main:mov a,p1
cjne a,#01h,go1//////makes the motor run clockwise
mov p3,#01h
go1:cjne a,#02h,go2/////makes the motor to run anti clockwise
mov p3,#02h
go2:sjmp main
end
Circuit diagram