Stepper motor controller
To the people who are implementing a stepper motor. Maybe the following
block diagram will help you. I got it from Michelle Kim at Hawaii University
 |
Revised FPGA modular diagram and datapath
|
The controller takes the given inputs and passes these values directly
to the speed calculator. The speed calculator outputs direction and speed
values and a send bit to the 4-bit register. As explained previously, the
register takes these inputs and holds them until a different input is given.
The speed values are passed to the select lines of the 8:1 multiplexer
and to the LED logic device. The directional value is passed to the state
machine. The LED logic device takes these speed values and outputs the
proper sequence for the 7-segment display, which are also outputs for the
controller. Concurrently, the counter is incrementing, clocked on the 12
MHz FPGA clock, and the seven highest order bits are outputted to seven
of the eight inputs of the 8:1 multiplexer. The first input is a constant
value of "0". Then the multiplexer checks the value of the speed given
to it by the 4-bit register and outputs the correct input based on the
value of the speed. The output of the multiplexer is passed to the clock
input of the state machine. The state machine then, in turn, checks the
directional input and outputs the motor sequence timed to its clock. These
four outputs of the state machine are also outputs of the controller module.
Your mates
Amit, Mandeep & Usama