dcmotor18 2.0.0.0
|
DC Motor 18 Click is a compact add-on board that contains a brushed DC motor driver. This board features the TB9051FTG, an automotive PWM-type single-channel H-Bridge DC brushed motor driver from Toshiba Semiconductor.
We provide a library for the DCMotor18 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 DCMotor18 Click driver.
dcmotor18_cfg_setup
Config Object Initialization function. dcmotor18_init
Initialization function. dcmotor18_default_cfg
Click Default Configuration function. dcmotor18_set_speed_percentage
Set speed output percentage. dcmotor18_set_enable
Set enable pin state. dcmotor18_read_an_pin_current
Read AN pin current. This example application showcases ability of click
board to control DC motors using PWM modulation in both directions and different speeds.
The demo application is composed of two sections :
Initialization of MCU communication modules (PWM, ADC, UART)
and additioal gpio for control of the device. Then sets default configuration that enables device to control the DC motor.
Drives motor in one direction from 0 to 100% of the speed using
PWM, and then returns it back to 0. Then changes the rotation direction and repeats the process of increasing and decreasing acceleration.
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.