dcmotor20 2.0.0.0
|
DC Motor 20 Click is a compact add-on board that contains a brushed DC motor driver. This board features the TC78H651AFNG, a dual H-bridge driver for one or two DC brushed motors, which incorporates DMOS with low ON resistance in output transistors from Toshiba Semiconductor.
We provide a library for the DCMotor20 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 DCMotor20 Click driver.
dcmotor20_cfg_setup
Config Object Initialization function. dcmotor20_init
Initialization function. dcmotor20_drive_motor
This function drives the motor for a certian time specified by time_ms at the desired speed. dcmotor20_set_channel_mode
This function sets the active channel and mode which will be used by the dcmotor20_drive_motor function. dcmotor20_set_standby_mode
This function sets the chip to the standby mode which affects both channels. This example demonstrates the use of DC Motor 20 click board by driving the motors in both direction in the span of 14 seconds.
The demo application is composed of two sections :
Initializes the driver and sets the click board to standby mode.
Drives the motors in the forward direction for 5 seconds, and then switches the direction, with a brake time of 2 seconds between switching the direction.
Each step will be logged on the USB UART where you can track the program flow.
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.