TOP Contributors

  1. MIKROE (2659 codes)
  2. Alcides Ramos (356 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 (136998 times)
  2. FAT32 Library (70115 times)
  3. Network Ethernet Library (56027 times)
  4. USB Device Library (46347 times)
  5. Network WiFi Library (41966 times)
  6. FT800 Library (41286 times)
  7. GSM click (29053 times)
  8. mikroSDK (26489 times)
  9. PID Library (26447 times)
  10. microSD click (25413 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

H-Bridge 4 click

Rating:

5

Author: MIKROE

Last Updated: 2019-10-25

Package Version: 1.0.0.0

mikroSDK Library: 1.0.0.0

Category: Brushed

Downloaded: 2924 times

Not followed.

License: MIT license  

H-Bridge 4 Click is a Click board that contains the AP1010AEN, which is a two channel H-Bridge motor driver compatible with a motor operating voltage up to 18V and can drive two DC motors or one stepper motor.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "H-Bridge 4 click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "H-Bridge 4 click" changes.

Do you want to report abuse regarding "H-Bridge 4 click".

  • mikroSDK Library 2.0.0.0
  • Comments (0)
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

H-Bridge 4 Click

H-Bridge 4 Click

Native view of the H-Bridge 4 Click board.

View full image
H-Bridge 4 Click

H-Bridge 4 Click

Front and back view of the H-Bridge 4 Click board.

View full image

Library Description

The library covers all the necessary functions to control H-Bridge 4 click board. The H-Bridge 4 click communicates with the target board through the AN, INT, PWM, RST and CS lines on MikroBUS. This library offers functions for setting or clearing of any and every of the five pins used for communication, also user can use functions that enable or disable clockwise or counter-clockwise motion, as well as standby mode and brake for both channels.

Key functions:

  • void hbridge4_motorAStandby() - Function is used to put motor A into standby.
  • void hbridge4_motorACW() - Function is used to put motor A into clockwise motion.
  • void hbridge4_motorABrake() - Function is used to brake motor A to a halt.

Examples description

The application is composed of three sections :

  • System Initialization - Initializes GPIO and LOG structures, sets AN, INT, PWM, RST and CS pins as output.
  • Application Initialization - Initialization driver enables GPIO and also starts write log.
  • Application Task - (code snippet) This example demonstrates the use of H-Bridge 4 click board by putting A motor in standby mode, then spining it in clockwise direction and applying brake function, and then spining it in counter-clockwise direction and applying brake function again.
void applicationTask()
{
    mikrobus_logWrite( "The motor A is in standby mode", _LOG_LINE );
    hbridge4_motorAStandby();
    Delay_ms( 100 );
    mikrobus_logWrite( "The motor A turns clockwise", _LOG_LINE );
    hbridge4_motorACW();
    Delay_ms( 2000 );
    mikrobus_logWrite( "The motor A applies brake", _LOG_LINE );
    hbridge4_motorABrake();
    Delay_ms( 1000 );
    mikrobus_logWrite( "The motor A turns counter-clockwise", _LOG_LINE );
    hbridge4_motorACCW();
    Delay_ms( 2000 );
    mikrobus_logWrite( "The motor A applies brake", _LOG_LINE );
    hbridge4_motorABrake();
    Delay_ms( 1000 );
}

Other mikroE Libraries used in the example:

  • UART

Additional notes and informations

Depending on the development board you are using, you may need USB UART clickUSB UART 2 click or 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

Expand 15 click

0

Expand 15 Click is a compact add-on board that contains a multi-channel I/O expander. This board features the TCAL6416, a general-purpose I/O expansion for most microcontroller families from Texas Instruments.

[Learn More]

Thermo 7 click

0

Thermo 7 click is a Click board™ equipped with the sensor IC, which can digitize temperature measurements between -55°C and +125°C so that the temperature measurement data can be processed by the host MCU.

[Learn More]

Headphone AMP click

0

Headphone Amp Click is a compact add-on board that contains a stereo headphone amplifier. This board features the LM4811, Boomer® audio power amplifier capable of delivering 105mW per channel with digital volume control from Texas Instruments. The Boomer® amplifiers are specifically designed to provide high-quality output power with a minimal amount of external components. Since the LM4811 does not require bootstrap capacitors or snubber networks, it is optimally suited for low-power portable systems. It features a digital volume control that sets the amplifier's gain from +12dB to −33dB in 16 discrete steps, in addition to a micro-power consumption Shutdown mode.

[Learn More]