Shop OBEX P1 Docs P2 Docs Learn Events
how to control a stepper motor with a shift register 74hc595 and basic stamp... — Parallax Forums

how to control a stepper motor with a shift register 74hc595 and basic stamp...

iolasiolas Posts: 14
edited 2008-07-18 11:18 in BASIC Stamp
smurf.gif· i need assistance for my project

I have already connect the circuit from my basic stamp2e 40 pins with the shift register 74hc595 and a stepper motor.
the problem is that i dont know how to make it work.
whats the programm code?

Comments

  • FranklinFranklin Posts: 4,747
    edited 2008-07-15 19:26
    What outputs does the stepper need? Could you draw a flowchart or supply psudocode of what you need?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • iolasiolas Posts: 14
    edited 2008-07-17 12:00
    the outputs of the shift register are connected to uln2003.
    the problem is that i dont know the code to write for the basic stamp to make it work.
  • FranklinFranklin Posts: 4,747
    edited 2008-07-17 14:37
    Your not ready for the codes until you figure out what pins need to be powered and in what order. When you know that you then write highs and lows to drive the motor.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • iolasiolas Posts: 14
    edited 2008-07-18 11:18
    As i know when i have tried without the shift register and with p4 p5 p6 p7 outputs from basic stamp connected to uln everything works.

    Step1 DATA %1100
    Step2 DATA %0110
    Step3 DATA %0011
    Step4 DATA %1001
    '
    [noparse][[/noparse] Initialization ]
    Setup:
    DIRB = %1111 ' make P4..P7 outputs
    stpDelay = 5 ' set step delay

    Now i connect the shift registers Q4 Q5 Q6 Q7 WITH the uln and i need the code to write to make it work.
Sign In or Register to comment.