TOP Contributors

  1. MIKROE (2653 codes)
  2. Alcides Ramos (351 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 (136650 times)
  2. FAT32 Library (69864 times)
  3. Network Ethernet Library (55901 times)
  4. USB Device Library (46244 times)
  5. Network WiFi Library (41871 times)
  6. FT800 Library (41107 times)
  7. GSM click (28960 times)
  8. PID Library (26403 times)
  9. mikroSDK (26325 times)
  10. microSD click (25341 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: 3267 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

Vibro Motor 2 click

0

Vibro Motor 2 Click features a compact size Eccentric Rotating Mass (ERM) motor, labeled as Z4FC1B1301781 as well as DMG3420U MOSFET to drive the ERM motor, since the MCU itself cannot provide enough power for the motor driving. This type of motor is often used for haptic feedback on many small handheld devices, such as the cellphones, pagers, RFID scanners and similar devices. This motor contains a small eccentric weight on its rotor, so while rotating it also produces vibration effect

[Learn More]

AC Current click

0

AC Current click is a device that is able to measure the alternating current (AC) running through the conductor, using the so-called non-invasive current sensor. The non-invasive sensor works by utilizing the electromagnetic induction phenomenon, similar to a transformer. The primary coil does not exist though, the electromagnetic field is generated by the AC Current running through the cable which is measured. The core of the sensing probe is split, allowing it to clamp on the current conducting cable. Since the sensor does not influence the measurement circuitry in any way while being galvanically isolated at the same time, it is an ideal solution to measure current running through mains, or similar high voltage installations.

[Learn More]

VREG 2 click

0

VREG 2 click is a voltage regulator click, with outstanding performances.

[Learn More]