TOP Contributors

  1. MIKROE (2752 codes)
  2. Alcides Ramos (372 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (118 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 (139064 times)
  2. FAT32 Library (71594 times)
  3. Network Ethernet Library (56989 times)
  4. USB Device Library (47330 times)
  5. Network WiFi Library (43006 times)
  6. FT800 Library (42297 times)
  7. GSM click (29777 times)
  8. mikroSDK (27874 times)
  9. PID Library (26858 times)
  10. microSD click (26129 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

STSPIN250 click

Rating:

5

Author: MIKROE

Last Updated: 2019-05-07

Package Version: 1.0.0.0

mikroSDK Library: 1.0.0.0

Category: Brushed

Downloaded: 3817 times

Not followed.

License: MIT license  

STSPIN250 click is a brushed DC motor driver with the current limiting and current sensing. It is based on the STSPIN250, a low voltage DC brushed motor driver.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "STSPIN250 click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "STSPIN250 click" changes.

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

STSPIN250

STSPIN250

Native view of the STSPIN250 board.

View full image
STSPIN250

STSPIN250

Front and back view of the STSPIN250 board.

View full image

Library Description

Initializes and defines gpio driver and constant values witch can be used in example code, and also performs the chip enable.

Key functions:

  • void stspin250_enable(uint8_t state) - Function for enable or disable device.
  • void stspin250_setPH(uint8_t state) - Function for select the direction of rotation of the motor.

Examples description

The application is composed of the three sections :

  • System Initialization - Sets AN,RST,CS and PWM pin as OUTPUT and INT pin as INPUT.
  • Application Initialization - Initialization driver init, PWM init and enable device.
  • Application Task - (code snippet) - Changes the PWM dutyCycle and controls the motor speed. You can change the direction of the motor rotation by setting PH to 0 or 1..
void applicationTask()
{
// PWM DEMO EXAMPLE
    _dutyCycle += 250;
    stspin250_pwmSetDuty(_dutyCycle);
    if (_dutyCycle > 40000 )
    {
        _dutyCycle = 0;
        stspin250_pwmStop();
        Delay_ms(2000);
        stspin250_pwmStart();
    }
	stspin250_setPH(1);
    Delay_ms( 200 );
}

Other mikroE Libraries used in the example:

  • GPIO
  • PWM

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

IrThermo 3 click

5

IrThermo 3 click is a device which allows contactless measurement of the object temperature.

[Learn More]

RTC 11 Click

0

RTC 11 Click is a compact add-on board that contains a real-time clock IC designed to maximize battery life and reduce overall battery requirements in wearable applications. This board features the AB0815, an ultra-low-power coupled with a highly sophisticated feature set the real-time clock from Abracon LLC.

[Learn More]

DAC 19 Click

0

DAC 19 Click is a compact add-on board designed for high-performance voltage-output applications. This board features the DAC53701-Q1, a 10-bit automotive-grade DAC from Texas Instruments, offering smart functionality through force-sense output, GPI function trigger, PWM output, and integrated nonvolatile memory (NVM). The board supports an internal or power supply reference, provides a full-scale output range, and communicates efficiently with microcontrollers using an I2C interface with up to 1MHz clock speed.

[Learn More]