We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]
Rating:
Author: MIKROE
Last Updated: 2019-01-15
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: Brushed
Downloaded: 4516 times
Followed by: 1 user
License: MIT license
DC MOTOR 7 click is a dual brushed DC motor driving Click board, featuring the advanced PWM chopper-type integrated DC motor driver, labeled as TB67H400AFTG.
Do you want to subscribe in order to receive notifications regarding "DC MOTOR 7 click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "DC MOTOR 7 click" changes.
Do you want to report abuse regarding "DC MOTOR 7 click".
Library Description
Library offers a choice to get 10bit result from the AD converter as one sample result or averaged result with desired number of samples. Result from the ADC can be calculated to get current in a proper value [mA], depending on the RSENSE, ROUT and VREF on the Current 2 Click board. For more details check documentation.
Key functions:
void dcmotor7_setMotor(uint8_t motor, uint8_t in1, uint8_t in2)
- Functions for set Motor.void dcmotor7_setTBLKAB(uint8_t tBLK)
- Functions for set Motor Ach and Bch Digital tBLK.void dcmotor7_setHBMode(uint8_t mode)
- Functions for set H-Bridge operation mode.Examples description
The application is composed of the three sections :
void applicationTask()
{
dcmotor7_setMotor(_DCMOTOR7_MOTOR_A, 0, 1);
dcmotor7_setMotor(_DCMOTOR7_MOTOR_B, 0, 1);
Delay_ms( 500 );
dcmotor7_motorStop(_DCMOTOR7_MOTOR_A);
dcmotor7_motorStop(_DCMOTOR7_MOTOR_B);
Delay_ms( 2000 );
dcmotor7_setMotor(_DCMOTOR7_MOTOR_A, 1, 0);
dcmotor7_setMotor(_DCMOTOR7_MOTOR_B, 1, 0);
Delay_ms( 500 );
dcmotor7_motorStop(_DCMOTOR7_MOTOR_A);
dcmotor7_motorStop(_DCMOTOR7_MOTOR_B);
Delay_ms( 2000 );
}
Other mikroE Libraries used in the example:
I2C
Additional notes and information
Depending on the development board you are using, you may need USB UART click, USB UART 2 clickor RS232 click to connect to your PC, for development systems with no UART to USB interface available on the board. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.