TOP Contributors

  1. MIKROE (2663 codes)
  2. Alcides Ramos (358 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 (137120 times)
  2. FAT32 Library (70240 times)
  3. Network Ethernet Library (56131 times)
  4. USB Device Library (46447 times)
  5. Network WiFi Library (42095 times)
  6. FT800 Library (41410 times)
  7. GSM click (29125 times)
  8. mikroSDK (26567 times)
  9. PID Library (26510 times)
  10. microSD click (25494 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: 4205 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

Thermo 23 click

0

Thermo 23 Click is a compact add-on board that provides an accurate temperature measurement. This board features the TMP144, a high-precision digital temperature sensor from Texas Instruments. The temperature sensor in the TMP144 is the chip itself, that houses temperature sensor circuitry, 12-bit analog-to-digital converter (ADC), a control logic, and a serial interface block in one package. Characterized by its high accuracy (up to ±0.5°C typical) and high resolution of 0.0625°C, this temperature sensor provides temperature data to the host controller with a configurable UART interface.

[Learn More]

UNI Hall click

5

The unipolar Hall effect sensor on UNI HALL click™ is sensitive to north pole magnetic fields—when exposed to such a field, it outputs a LOW logic level. Othewise the output is a HIGH logic level. In its simplest application, UNI HALL click™ can be employed as part of a long lasting contactless proximity switch.

[Learn More]

USB-C Sink 2 click

0

USB-C Sink 2 Click is a compact add-on board with a standalone autonomous USB power delivery controller. This board features the AP33772, a high-performance USB PD sink controller from Diodes Incorporated. It supports dead battery mode to allow a system to be powered from an external source directly, establishes a valid source-to-sink connection, and negotiates a USB power delivery (PD) contract with a PD-capable source device. It also supports a flexible PD3.0 and PPS for applications that require direct voltage and current requests, with fine-tuning capabilities.

[Learn More]