Stepper + DIRA
o_wan
Posts: 15
I'm driving a stepper with ULN2003 + DIRB (PIN4,5,6,7)
But When I added 1 more stepper to PIN0,1,2,3
Change the code as below, it doesn't work.
I've checked all the wiring andit shouldn't cause any problem. I'm thinking may be because of the binary digits. Any hints?
Cheers,
A
i VAR NIB
delay VAR BYTE
DIRA = %1111
delay = 40 'slow the step speed
cw:
FOR i = 1 TO 10
OUTA = %0011 'I/O pins 0 and 2 high
DEBUG i
PAUSE delay
OUTA = %0110 'I/O pins 0 and 3 high
DEBUG i
PAUSE delay
OUTA = %1100 'I/O pins 1 and 3 high
DEBUG i
PAUSE delay
OUTA = %1001 'I/O pins 1 and 2 high
DEBUG i
PAUSE delay
NEXT
PAUSE 2000
GOTO cw
But When I added 1 more stepper to PIN0,1,2,3
Change the code as below, it doesn't work.
I've checked all the wiring andit shouldn't cause any problem. I'm thinking may be because of the binary digits. Any hints?
Cheers,
A
i VAR NIB
delay VAR BYTE
DIRA = %1111
delay = 40 'slow the step speed
cw:
FOR i = 1 TO 10
OUTA = %0011 'I/O pins 0 and 2 high
DEBUG i
PAUSE delay
OUTA = %0110 'I/O pins 0 and 3 high
DEBUG i
PAUSE delay
OUTA = %1100 'I/O pins 1 and 3 high
DEBUG i
PAUSE delay
OUTA = %1001 'I/O pins 1 and 2 high
DEBUG i
PAUSE delay
NEXT
PAUSE 2000
GOTO cw
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax