Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
03/15/02 16:12
Read: times


 
#20882 - RE: Stepper motor
What are the pin connections to your stepper drive? Some have built in oscillators to control step rates, or a clk input so you can control step rate.

Very simplified:

Hook each of needed control pins of drive to port pins of 8051.

set motor enable pin as needed.
set direction pin as needed.

step: setb clk
mov r0,#255
djnz r0,$
clr clk
mov r0,#255
djnz r0,$
ret

call the step routine for as many steps as you want to take. Change the value of r0 to a lower number will increase the step rate. Add more delay loops to slow it down. Or you can use one of the timers if you want.

Jon

List of 5 messages in thread
TopicAuthorDate
Stepper motor            01/01/70 00:00      
RE: Stepper motor            01/01/70 00:00      
RE: Stepper motor            01/01/70 00:00      
RE: Stepper motor            01/01/70 00:00      
RE: Stepper motor            01/01/70 00:00      

Back to Subject List