TOP Contributors

  1. MIKROE (2642 codes)
  2. Alcides Ramos (348 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (112 codes)
  5. Chisanga Mumba (90 codes)
  6. S P (73 codes)
  7. dany (71 codes)
  8. MikroBUS.NET Team (35 codes)
  9. NART SCHINACKOW (34 codes)
  10. Armstrong Subero (27 codes)

Most Downloaded

  1. Timer Calculator (136227 times)
  2. FAT32 Library (69495 times)
  3. Network Ethernet Library (55712 times)
  4. USB Device Library (45996 times)
  5. Network WiFi Library (41640 times)
  6. FT800 Library (40804 times)
  7. GSM click (28789 times)
  8. PID Library (26333 times)
  9. mikroSDK (26061 times)
  10. microSD click (25148 times)
Libstock prefers package manager

Package Manager

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]

< Back
mikroSDK Library

DC MOTOR 7 click

Rating:

6

Author: MIKROE

Last Updated: 2019-01-15

Package Version: 1.0.0.0

mikroSDK Library: 1.0.0.0

Category: Brushed

Downloaded: 3943 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.

No Abuse Reported

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".

  • mikroSDK Library 2.0.0.0
  • Comments (1)
DOWNLOAD LINK RELATED COMPILER CONTAINS
mikroBasic PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc

mikroSDK Library Blog

DC Motor 7 click

DC Motor 7 click

Native view of the DC Motor 7 click board.

View full image
DC Motor 7 click

DC Motor 7 click

Front and back view of the DC Motor 7 click board.

View full image

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 :

  • System Initialization - Initializes I2C module and sets RST pin and PWM pin as OUTPUT.
  • Application Initialization - Initialization driver init, enabled all output port, sets H-Bridge operation mode and Motor Digital tBLK.
  • Application Task - (code snippet) -  Set the motor A and the motor B to rotate clockwise and in the Counte clockwise direction, and between the change of direction, the motor stops the motor.
  • note VM input - 10 V (min) to 47 V (max)
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 clickUSB 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.

ALSO FROM THIS AUTHOR

Air quality click

0

Air quality click carries an MQ-135 sensor for detecting poisonous gases that impact air quality in homes and offices. The click is designed to run on a 5V power supply. It communicates with the target microcontroller over the AN pin on the mikroBUS™ line.

[Learn More]

Magneto 13 click

0

Magneto 13 Click is a compact add-on board with an accurate and reliable magnetic device. This board features the MA736, a contactless digital angle sensor from Monolithic Power Systems. It is a MagAlpha sensor that detects the absolute angular position of a permanent magnet, typically a diametrically magnetized cylinder or a rotating shaft. The MA736 sensor supports a wide range of magnetic field strengths, end-of-shaft, and side-shaft (off-axis mounting) spatial configurations.

[Learn More]

Interrupts on PIC32MX460F512L

0

This example demonstrates how to setup:
- External INT2 interrupt on PORTE.9 pin
- UART RX event interrupt

[Learn More]