
GENERATING SWITCHING SEQUENCES
Inaddition toselecting amotor anddetermining power-
stagedesign, youmustalso decidehowtogenerate the
switchingsequences thatstepthemotor. Programming
a
μ
Corusinga special piece of hardware called atran-
sistor accomplishes this task.
Software translation is more economical, and it is the
first choice for large-volume products. Fig. A shows a
basic step procedure (a) that you can integrate into a
routine (b) ; the routine executes a clockwise rotation
of N steps at a fixed rate. The step rate isdefined by a
softwareloop, but youcanalso use programmed timer
interrupts.
Fig. A
: A
μ
C can generate the phase sequence (a)
for a stepper motor. A routine (b) expands a
single-step routine into are that executes a
move of N steps.
A simpler approach uses the software equivaent of a
shiftregister. Forexample, you canload a 99(hex) into
a register andtake thephases frombits 0to 3.ARotate
Left instruction yields aclockwise step ; aRotate Right
instruction causes a counterclockwise move.
When software translation ties up your
μ
C, lighten the
loadbyadding ahardware translator.Inapplcations in-
volving unidirectional motors,this logic circuit (fig.B)re-
quires only one pulse for each step ; you’l alsoneed a
direction signa (b) if your motor rotates in both direc-
tions.By adding a7408toa2-phase translator,youcan
satisfy a wave-drive application (c), while the addition
of two OR gates provides fast turn-off in wave-drive
mode.
Fig. B :
Built a simple 2-phase hardware translator
using a dual flip-flop, for single (a) or bidirec-
tional (b) rotation. Add some extra ICs for
wave-drive signals (c) and to provide fast
turn-off(d).
a)
b)
b)
c)
d)
a)
APPLICATION NOTE
4/8