Shop OBEX P1 Docs P2 Docs Learn Events
Stepper + DIRA — Parallax Forums

Stepper + DIRA

o_wano_wan Posts: 15
edited 2005-06-29 13:00 in BASIC Stamp
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

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-06-29 13:00
    Check your wiring again; the sequence looks correct. And you might want to test your pins; maybe one of the pins on OUTA is broken and no working as an output.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
Sign In or Register to comment.