Hardware Reference
In-Depth Information
Program Operation
The program used in this chapter is named bipolar.c and is listed at the end of the
chapter. The program is designed similarly to the unipolar program in Chapter 6. The
bipolar program, however, does not do clock positioning, but instead operates in free-
running mode when instructed to do so.
The program starts in one-phase mode, but the stepper-motor mode can be changed
with any of the following single-character commands:
Character
Command
1
Wave mode, one phase
2
Wave mode, two phase
3
Half-step mode
Entering a mode command will automatically stop the motor if it is in
free-running mode.
To test your motor connections, these single-step commands are available:
Character
Command
+
Single step clockwise
-
Single step counterclockwise
The + command steps the motor one step clockwise, while the - (minus) key steps
the motor counterclockwise. If your motor turns the wrong way, you can fix your wiring
after testing it.
Similarly, use these single-step commands to make sure your motor is wired up
correctly. In one-phase mode (the default), the motor should step equally with
each + or - step command. If not, one of the two pairs needs its connections reversed.
The free-running commands (and Quit) are listed here:
Character
Command
F
Forward (free running)
R
Reverse (free running)
S
Stop
>
Go faster (halve the step time)
<
Go slower (double the step time)
Q
Quit
 
 
Search WWH ::




Custom Search