# Thread: What do the step and direction pulses do?

1. ## What do the step and direction pulses do?

A friend of mine is building a stepper driver, writing his own program for a PIC.
He needs to nkow about step and direction. I would not mind knowing either...

What exactly does it 'tell' the motor? Can somebody give a breakdown of what these pulses do, is it change direction or what? I will give more specific questions in a few hours when I see him again

2. Originally Posted by phantomcow2
A friend of mine is building a stepper driver, writing his own program for a PIC.
He needs to nkow about step and direction. I would not mind knowing either...

What exactly does it 'tell' the motor? Can somebody give a breakdown of what these pulses do, is it change direction or what? I will give more specific questions in a few hours when I see him again
It doesn't tell the motor anything, it's aimed to the controller. The controller has to change the polarity on the motor's windings to make it move.

Assuming a unipolar drive, a sequence like this is needed to move it on one direction:

1000
0100
0010
0001

or for halfstepping:

1100
0110
0011
1001

For turning the other way the sequence must be reversed. So whenever the controller receives a step signal while the direction pin is high it should move the motor in the next step of the sequence, if the direction is low to the previous.

What the controller will do from there depends on the type of motor it has to control (unipolar/ bipolar) and the step type (full/ half etc).

Nikolas

3. Alright I hvae a specific question now.
What does the direction pulse going into the driver look like?

4. I thought this was half step sequence.

1000
1100
0100
0110
0010
0011
0001
1001

5. Originally Posted by phantomcow2
Alright I hvae a specific question now.
What does the direction pulse going into the driver look like?
For steppers, the pulse step sequences the direction.
(Could be wrong here. I'll let the experts weight in on this one.)

Direction 1
1000
1100
0100
0110
0010
0011
0001
1001

Direction 2
1001
0001
0011
0010
0110
0100
1100
1000

6. Originally Posted by phantomcow2
A friend of mine is building a stepper driver, writing his own program for a PIC.
He needs to nkow about step and direction. I would not mind knowing either...

What exactly does it 'tell' the motor? Can somebody give a breakdown of what these pulses do, is it change direction or what? I will give more specific questions in a few hours when I see him again
Check this out. PIC program for step and direction.

http://www.dakeng.com/u2.html