dcmotor21 2.0.0.0
|
DC Motor 21 Click is a compact add-on board that contains a brushed DC motor driver. This board features the A3910, a DC motor driver designed for low voltage power applications from Allegro Microsystems. It is controlled via several GPIO pins and has a wide operating voltage range with an output current capacity of 500mA. In addition to the possibility to be used in the full-bridge configuration to drive a single bidirectional DC motor, it can also be used as a dual half-bridge to drive dual DC motors.
We provide a library for the DCMotor21 Click as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Package can be downloaded/installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.
This library contains API for DCMotor21 Click driver.
dcmotor21_cfg_setup
Config Object Initialization function. dcmotor21_init
Initialization function. dcmotor21_default_cfg
Click Default Configuration function. dcmotor21_set_out_1
This function sets the state of output 1. dcmotor21_set_out_2
This function sets the state of output 2. This example demonstrates the use of DC Motor 21 click board.
The demo application is composed of two sections :
Initializes the driver and performs the click default configuration.
In the span of six seconds, it drives the motor in one direction, then switches the direction, and after that disconnects the motor. Each step will be logged on the USB UART where you can track the program flow.
For this example, a DC motor should be connected to OUT1 and OUT2 lines.
The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.
Other Mikroe Libraries used in the example:
Additional notes and informations
Depending on the development board you are using, you may need USB UART click, USB UART 2 Click or RS232 Click to connect to your PC, for development systems with no UART to USB interface available on the board. UART terminal is available in all MikroElektronika compilers.