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 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: 4096 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

LTE IoT 11 click

0

LTE IoT 11 Click is a compact add-on board with an optimized global coverage module, as it supports a comprehensive set of bands required for global deployment. This board features the TX62-W, a global MTC module from Thales. It delivers global LTE-M, NB-IoT (NB1 and NB2) connectivity from a single SKU, and it is the first Thales product to adopt a revolutionary “Things” footprint. Besides, it integrates an embedded GNSS multi-constellation, state-of-the-art secure services, and more.

[Learn More]

Thermo 20 click

5

Thermo 20 Click is a compact add-on board that provides an accurate temperature measurement. This board features the TSYS03, a miniature digital temperature sensor that comes up with factory calibrated, highly accurate temperature data from TE Connectivity Measurement Specialties.

[Learn More]

9DOF click

0

9DOF click carries ST’s LSM9DS1 inertial measurement module that combines a 3D accelerometer, a 3D gyroscope and a 3D magnetometer into a single device outputting so called nine degrees of freedom data...

[Learn More]