TOP Contributors

  1. MIKROE (2693 codes)
  2. Alcides Ramos (362 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (112 codes)
  5. Bugz Bensce (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 (137949 times)
  2. FAT32 Library (70758 times)
  3. Network Ethernet Library (56444 times)
  4. USB Device Library (46825 times)
  5. Network WiFi Library (42586 times)
  6. FT800 Library (41785 times)
  7. GSM click (29468 times)
  8. mikroSDK (27020 times)
  9. PID Library (26661 times)
  10. microSD click (25797 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 9 click

Rating:

5

Author: MIKROE

Last Updated: 2019-03-25

Package Version: 1.0.0.0

mikroSDK Library: 1.0.0.0

Category: Brushed

Downloaded: 4440 times

Not followed.

License: MIT license  

DC Motor 9 Click is a brushed DC motor driver with the current limiting and current sensing. It is based on the DRV8871, an integrated H-Bridge driver IC, optimized for motor driving applications.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "DC MOTOR 9 click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "DC MOTOR 9 click" changes.

Do you want to report abuse regarding "DC MOTOR 9 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

DC MOTOR 9 click

DC MOTOR 9 click

Native view of the DC MOTOR 9 click board.

View full image
DC MOTOR 9 click

DC MOTOR 9 click

Front and back view of the DC MOTOR 9 click board.

View full image

Library Description

Library contains functions for setting CS and RST pins to HIGH or LOW level.

Key functions:

  • void dcmotor9_csSet( uint8_t pinState ) - Sets CS pin state to HIGH or LOW.
  • void dcmotor9_rstSet( uint8_t pinState ) - Sets CS pin state to HIGH or LOW.

Examples description

The application is composed of the three sections :

  • System Initialization - Initializes LOG, PWM pin as output, RST pin as input and CS pin as output.
  • Application Initialization - Initializes GPIO driver and ADC and PWM functionalities.
  • Application Task - Executes dcmotor9_getVoltAmperWatt( ) - function.
void applicationTask( )
{
    _adcValue = dcmotor9_adcRead( );
    WordToStr( _adcValue, text );
    mikrobus_logWrite( text, _LOG_TEXT );
    mikrobus_logWrite( " ", _LOG_LINE );
    Delay_ms(750);
}

Additional Functions :

  • dcmotor9_init( ) - Initializes PWM and ADC.
  • dcmotor9_getVoltAmper( float adcRef ) - Performs ADC measurements and converts them to values of current and voltage.

Notes:

  • Change pwm frequencty (uint16_t _frequency) from 0 to some value.
  • Change pwm duty cycle (_dutyCycle = _maxDuty) from _maxDuty to value in range from 0 - _maxDuty.
  • Optional : call - dcmotor9_getVoltAmper( adcRef ) - function to get value of voltage and current on shunt.
  • float adcRef - is ADC value read from AN pin while no load is connected to device.

Other mikroE Libraries used in the example:

  • ADC
  • PWM
  • UART
  • Conversions

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

Ammeter click

0

Ammeter click is a mikroBUS add-on board with circuitry for measuring electric current (both AC and DC).

[Learn More]

IR Gesture 3 click

0

IR Gesture 3 Click is a compact add-on board that provides contactless gesture recognition. This board features the ADPD1080, a photometric front-end from Analog Devices. The IR Gesture 3 Click allows gesture recognition in two dimensions, with a built-in optical filter and a sharp visible light cutoff. It eliminates the need for external lenses and preserves the dynamic range of the sensor when placed under sunlight or indoor lighting. It does not require a precise alignment because its sensor maintains a linear response within the ±35° angular field of view.

[Learn More]

CANculator

5

CANculator is a software development tool used for easier CAN baud rate calculation and manipulation of the CAN bus parameters.

[Learn More]