TOP Contributors

  1. MIKROE (2662 codes)
  2. Alcides Ramos (357 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 (137028 times)
  2. FAT32 Library (70154 times)
  3. Network Ethernet Library (56032 times)
  4. USB Device Library (46355 times)
  5. Network WiFi Library (41970 times)
  6. FT800 Library (41297 times)
  7. GSM click (29071 times)
  8. mikroSDK (26509 times)
  9. PID Library (26452 times)
  10. microSD click (25439 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

Charger 12 click

Rating:

5

Author: MIKROE

Last Updated: 2019-09-18

Package Version: 1.0.0.0

mikroSDK Library: 1.0.0.0

Category: Power supply

Downloaded: 3320 times

Not followed.

License: MIT license  

Charger 12 Click is a single lithium-ion (Li+) cell or three-cell NiMH/NiCd battery charger. This click can be used for Low-Cost Li-Ion battery chargers, or Power Tools, toys, backup energy storage solutions, etc.

No Abuse Reported

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

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

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

Charger 12 click

Charger 12 click

Native view of the Charger 12 click board.

View full image
Charger 12 click

Charger 12 click

Front and back view of the Charger 12 click board.

View full image

Library Description

Library contains functions for getting and setting GPIO pin states Library contains function for mode selection Library contains function for SPI transfer operation Library contains function for SPI get register operation Library contains functions for incrementing and decrementing wiper position

Key functions:

  • uint8_t charger12_mode_select( uint8_t mode_select ) - selects device operation mode by setting RST(CHGEN) and PWM(MODE) pins
  • void charger12_spi_increment_wiper( void ) - increments wiper position by sending 8bit increment wiper command
  • void charger12_spi_decrement_wiper( void ) - decrements wiper position by sending 8bit decrement wiper command

Examples description

The application is composed of three sections :

  • System Initialization - Initializes GPIO pins, SPI and LOG modules
  • Application Initialization - Iniztializes SPI driver
  • Application Task - Executes additional functions based on user input
void applicationTask( )
{
    uart_ready = UART_Data_Ready( );

    if (uart_ready == 1)
    {
        uart_char = UART_Read( );

        switch (uart_char)
        {
            case '+' :
            {
                charger12_case_Plus( );
                break;
            }
            case '-' :
            {
                charger12_case_Minus( );
                break;
            }
            case '1' :
            {
                charger12_case_One( );
                break;
            }
            case '2' :
            {
                charger12_case_Two( );
                break;
            }
            case '3' :
            {
                charger12_case_Three( );
                break;
            }
            case '4' :
            {
                charger12_case_Four( );
                break;
            }
            default :
            {
                mikrobus_logWrite( "> Invalid command", _LOG_LINE );
                break;
            }
        }
    }
}

Additional Functions :

  • charger12_case_Plus() - Increments Wiper position
  • charger12_case_Minus() - Decrements Wiper position
  • charger12_case_One() - Selects 1st mode of operation
  • charger12_case_Two() - Selects 2nd mode of operation
  • charger12_case_Three() - Selects 3rd mode of operation
  • charger12_case_Four() - Selects 4th mode of operation

Other mikroE Libraries used in the example:

  • SPI
  • 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

Angle 3 click

0

Angle 3 click carries the AK7451, a magnetic rotational angle sensor. The click is designed to run on a 5V power supply.

[Learn More]

Remote Weather Station with ClickCloud - GSM platform

0

What is the weather going to be like today? That’s the first question everyone asks in the morning. With this innovative project you can measure temperature and humidity in real time! You can even access this data remotely via the G2C 3G Click, a reliable connection to the Click Cloud platform, a cloud-based rapid prototyping environment.

[Learn More]

LTE Cat.1 2 click

0

LTE Cat.1 2 Click (EU) is a compact add-on board that provides your application with complete LTE and VoLTE with CSFB functionalities. This board features the ELS62-E, a single antenna LTE cat.1bis module from Telit.

[Learn More]