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 (137070 times)
  2. FAT32 Library (70199 times)
  3. Network Ethernet Library (56082 times)
  4. USB Device Library (46395 times)
  5. Network WiFi Library (42013 times)
  6. FT800 Library (41349 times)
  7. GSM click (29108 times)
  8. mikroSDK (26544 times)
  9. PID Library (26486 times)
  10. microSD click (25483 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
Example

DC Motor 8 click

Rating:

5

Author: MIKROE

Last Updated: 2018-07-19

Package Version: 1.0.0.0

Example: 1.0.0.0

Category: Brushed

Downloaded: 5337 times

Not followed.

License: MIT license  

DC Motor 8 click is a DC motor driver. It can drive simple DC motors with brushes, providing them with a significant amount of current and voltage up to 40V.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "DC Motor 8 click" changes.

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

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

Example Blog

DC Motor 8 Click

DC Motor 8 Click

Native view of the DC Motor 8 Click board

View full image
DC Motor 8 Click

DC Motor 8 Click

Front and back view of the DC Motor 8 Click board

View full image

Library Description
Initializes and defines GPIO driver and constant values wich can be used in example code and also enables chip.

Key functions

void dcmotor8_setFreq(uint16_t freq, uint8_t step) - Function sets frequency and current duty for PWM Timer5.
void dcmotor8_startMotor(uint16_t delayTime, uint8_t stopEnable) - Function sets delay time witch decides when PWM Timer5 will be stoped and started again. If stopEnable is 1 the PWM Timer5 will be stoped, and if 0 will be not stoped.

Examples Description
The demo application is composed of three sections:

  • System Initialization - Initializes peripherals and pins.
  • Application Initialization - Initializes click driver.
  • Application Task - Sets frequency and current duty of PWM Timer5 and decides will Timer5 be stoped and when. Also makes decide when Timer5 will be started again.
void applicationTask()
{
    char txt[4] = {0};

//Sets frequency 20kHz and current duty 36000 (Duty range is from 0 to 65535)
    dcmotor8_setFreq(_DCMOTOR8_20KHZ, _DCMOTOR8_DUTY_36000);

//Enables motor stop working and sets 20 sec work time and 4 sec disabling time
    dcmotor8_startMotor(_DCMOTOR8_DELAY_20SEC, _DCMOTOR8_DELAY_4SEC, 
_DCMOTOR8_STOP_ENABLE);

//Writes on USB UART value of current duty for PWM Timer5
    IntToStr(pwmPeriod, txt);
    mikrobus_logWrite("Value of PWM timer period is: ", _LOG_TEXT);
    mikrobus_logWrite(txt, _LOG_LINE);

    Delay_ms(100);
}

Additional notes and information
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 9 click

0

LTE IoT 9 Click is a compact add-on board containing a cellular IoT Module that supports 3GPP Release 14 and all LTE bands.

[Learn More]

BATT-MAN click

5

BATT-MAN click is a very versatile battery operated power manager. When powered via mikroBUS, it will charge the connected LiPo 3.7V battery, while providing the output voltage on all its outputs at the same time.

[Learn More]

Stepper 5 click

0

Stepper 5 Click is the complete integrated bipolar step motor driver solution, rich with many features that allow silent operation and optimal working conditions for the connected motor. The specialized TMC2208 IC driver from Trinamic company far exceeds the capabilities of similar step motor drivers that are commonly used. In order to achieve such outstanding performances with a wide range of various step motors, this device features several technologies: stealth Chop2™ - for silent motor operation; spreadCycle™ - highly dynamic, motor current control; microPlayer™ interpolation with 256 microsteps.

[Learn More]