1.2.1. Design Example: Targeting a MDN-B2 Demo Board (MAX II Devices)
You can implement this design with an EPM240 or any other MAX® II device.
The stepper motor works by supplying inputs through a user interface, which form the controller inputs to the MAX® II device. You can input mode, direction, and step control through user buttons and switches that are assigned to various general purpose I/Os (GPIOs) of the MAX® II device.
The following details the implementation of this design on the MDN-B2 demo board using this design source code. For illustrative purposes, this design is made using LEDs. Each LED represents a winding of the motor. The winding energizing sequence can thus be “seen” on the demo board. However, note that the LEDs glow on a logic 0 and are turned off when the port detects a logic 1. You can replace these LEDs by a motor driver circuit to run a motor. All the lines are parallel and independent of each other. Each line excites one separate coil winding of the motor and causes the rotor to rotate in a specific direction and manner as set by the user control.
Signal | Pin |
---|---|
dir | pin 38 |
mode | pin 37 |
move | pin 82 |
rst | pin 77 |
phaseout[0] | pin 71 |
phaseout[1] | pin 72 |
phaseout[2] | pin 73 |
phaseout[3] | pin 74 |
To demonstrate this design on the MDN-B2 demo board, follow these steps: