Basys MX3™ Board Reference Manual
14.2 Functionality
The control of Motor module is implemented in the MOT library of the Basys MX3 library pack. Features of the
implementation:
Mode selection is implemented by setting the digital output MODE pin.
Separate functionalities are implemented, corresponding to the two modes: IN/IN and PH/EN.
in IN/IN mode, the 4 control pins AIN1, AIN2, BIN1, BIN2 are used as digital outputs, in this manner:
o
They are initialized in a (1, 1, 0, 0) configuration, considered an unsigned hexadecimal value
0x0C.
o
To perform stepper motor steps, the configuration value is rotated left or right (according to the
motor's direction) with the desired number of steps.
In PH/EN mode, the AIN1 and BIN1 are used as outputs, while the AIN2 and BIN2 are mapped to OC2 and
OC3 modules, which are configured to generate PWM signals. The control of the 2 DC motors is done like
this:
o
The direction is set to digital output AIN1 (DC motor A) or BIN1 (DC motor B)
o
The speed of the motor is implemented by loading the OC2RS (DC motor A) or OC3RS (DC motor
B) registers with the desired values
If the user wants to use the Motor driver module without the MOT library, they must implement their own Motor
driver control functionality and can use the code in the library as a reference.
15 Servo Headers
The Basys MX3 provides two 3-pin servo headers, labeled SERVO 0 and SERVO 1.
Servo motors are designed to move to a precise desired position and then stop, and are composed of a control
board, motor, sense potentiometer, and gears that connect the motor and output shaft. A digital signal is sent to
the control board which then drives the motor until the sense potentiometer verifies that the output shaft is in the
correct position.
Copyright Digilent, Inc. All rights reserved.
Other product and company names mentioned may be trademarks of their respective owners.
Figure 15.1. Servo header schematic diagram.
Page 35 of 56
Need help?
Do you have a question about the Basys MX3 and is the answer not in the manual?
Questions and answers