TOP Contributors

  1. MIKROE (2650 codes)
  2. Alcides Ramos (350 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 (136552 times)
  2. FAT32 Library (69750 times)
  3. Network Ethernet Library (55851 times)
  4. USB Device Library (46191 times)
  5. Network WiFi Library (41812 times)
  6. FT800 Library (41007 times)
  7. GSM click (28930 times)
  8. PID Library (26386 times)
  9. mikroSDK (26292 times)
  10. microSD click (25304 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: 5248 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

BLE 9 click

0

BLE 9 Click is a fully embedded stand-alone Bluetooth 5.2 Energy connectivity module, equipped with the EFR32BG22 Series 2 Modules, an ultra-small, high-performing, standalone Bluetooth low energy module for easy integration of Bluetooth low energy connectivity (BLE) into various electronic devices. This module combines a high-performance Arm® Cortex®-M33 CPU microprocessor with FPU, and state-of-the-art power performance. Reliable and easy to use, BLE 9 click is a perfect solution for development of various IoT applications, smart home applications, BLE enabled toys, advanced robotics, and other similar applications.

[Learn More]

LightHz click

0

LightHz Click is a compact add-on board that effectively measures ambient light intensity. This board features the TL2L30BR, a programmable light-to-frequency converter from ams. The sensor outputs either a pulse train or a square wave (50% duty cycle) with a frequency directly proportional to light intensity (irradiance). It has programmable sensitivity and full-scale output frequency and could be used as a rough color detector with a selectable frequency range.

[Learn More]

Temp-Log 4 click

5

Temp-Log 4 Click is a temperature measuring Click board featuring the SE97B IC, an accurate temperature sensor IC with integrated EEPROM. Besides the thermal sensor, this IC is equipped with additional 256 bytes of EEPROM, integrated on the same die.

[Learn More]