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 (136696 times)
  2. FAT32 Library (69915 times)
  3. Network Ethernet Library (55929 times)
  4. USB Device Library (46254 times)
  5. Network WiFi Library (41882 times)
  6. FT800 Library (41138 times)
  7. GSM click (28975 times)
  8. PID Library (26407 times)
  9. mikroSDK (26350 times)
  10. microSD click (25351 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 11 click

Rating:

5

Author: MIKROE

Last Updated: 2019-08-30

Package Version: 1.0.0.0

mikroSDK Library: 1.0.0.0

Category: Battery Charger

Downloaded: 2324 times

Not followed.

License: MIT license  

Charger 11 Click is a LiFePO4 (lithium iron phosphate) battery charger. This click can be used for Low-Cost LiFePO4 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 11 click" changes.

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

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

Charger 11 click

Native view of the Charger 11 click board.

View full image
Charger 11 click

Charger 11 click

Front and back view of the Charger 11 click board.

View full image

Library Description

Library contains function for getting INT pin state Library contains functions for setting AN, PWM and CS pin states Library contains function for spi transfer Library contains functions for getting and setting registers via SPI Library contains functions for wiper increment and decrement Library contains function for getting wiper position Library contains function for getting raw adc data Library contains function for getting output voltage

Key functions:

  • void charger11_spi_increment_wiper( void ) - increments wiper position by sending 8bit increment wiper command
  • void charger11_spi_decrement_wiper( void ) - decrements wiper position by sending 8bit decrement wiper command
  • float charger11_i2c_get_volt( float reference_voltage ) - gets raw ADC data and converts it to voltage based on reference voltage setting

Examples description

The application is composed of three sections :

  • System Initialization - Initalizes INT, PWM, CS, AN pins and SPI, I2C, LOG modules
  • Application Initialization - Initializes SPI and I2C drivers
  • Application Task - Waits for user input in order to increment, decrement wiper or log report (Wiper position and Output voltage)
void applicationTask( )
{
    uart_ready = UART_Data_Ready( );
    
    if (uart_ready == 1)
    {
        uart_char = UART_Read( );
        
        switch (uart_char)
        {
            case '+' :
            {
                charger11_case_Plus( );
                break;
            }
            case '-' :
            {
                charger11_case_Minus( );
                break;
            }
            case 'r' :
            {
                charger11_case_Report( );
                break;
            }
            default :
            {
                mikrobus_logWrite( "> Invalid command", _LOG_LINE );
                break;
            }
        }
    }
}


Additional Functions :

  • charger11_FloatCut( ) - Rounds float value to two decimals
  • charger11_log_wiper_position( ) - Logs current Wiper position
  • charger11_case_Plus( ) - Increments Wiper position
  • charger11_case_Minus( ) - Decrements Wiper position
  • charger11_case_Report( ) - Logs current Wiper position and Output voltage

Other mikroE Libraries used in the example:

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

H-Bridge Driver click

5

H-Bridge Driver Click is a compact add-on board that contains an H-bridge gate driver, also known as a full-bridge pre-driver. This board features the MC33883, an H-Bridge gate driver with an integrated charge pump and independent high and low side gate drive channels from NXP Semiconductors.

[Learn More]

ADC 15 click

0

ADC 15 Click is a compact add-on board that contains a high-performance data converter. This board features the ADS131M02, a two-channel, simultaneously sampling, 24-bit, delta-sigma (ΔΣ), analog-to-digital converter from Texas Instruments. The ADC inputs can be independently configured via serial peripheral interface depending on the sensor input. A low noise, programmable gain amplifier (PGA) provides gains ranging from 1 to 128 to amplify low-level signals.

[Learn More]

Stepper 10 click

5

Stepper 10 Click is a two-phase bipolar stepping motor driver capable of controlling one stepper motor with PWM constant current drive. Click's featured chip TB67S128FTG, from Toshiba Semiconductor, fabricated with BiCD process with an output rating of 50V/5A and a built-in decoder can supply the motor with voltage of up to 44V.

[Learn More]