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]
Rating:
Author: MIKROE
Last Updated: 2018-06-15
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: Battery Charger
Downloaded: 4515 times
Followed by: 1 user
License: MIT license
Charger 2 click is a LiPo battery charger with the additional monitoring IC onboard. This Click board as a whole, offers unpreceded LiPo battery charging and monitoring solution for 4.2V LiPo batteries, with the capacity up to 7000 mAh.
Do you want to subscribe in order to receive notifications regarding "Charger 2 click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "Charger 2 click" changes.
Do you want to report abuse regarding "Charger 2 click".
Library Description
This library provides generic functions for working with the Click board™.
Key functions:
uint8_t charger2_writeReg( uint8_t register_address, uint8_t transfer_data )
- The function writes one-byte data to the register.uint8_t charger2_readReg( uint8_t register_address, uint8_t *valueOut, uint8_t nBytes )
- The function reads the desired number of data bytes.uint8_t charger2_readData( uint8_t dataMode, uint32_t *dataOut )
- The function reads the desired data from data registers and converts this data to the appropriate unit.Examples Description
The application is composed of three sections:
void applicationTask() { charger2_readData( _CHARGER2_GAS_GAUGE_CHARGE_DATA, &batteryData ); resultsLogger(); charger2_readData( _CHARGER2_CONV_NUMBER, &batteryData ); resultsLogger(); charger2_readData( _CHARGER2_SHUNT_VOLTAGE, &batteryData ); resultsLogger(); charger2_readData( _CHARGER2_BATTERY_VOLTAGE, &batteryData ); resultsLogger(); charger2_readData( _CHARGER2_TEMPERATURE, &batteryData ); resultsLogger(); charger2_readData( _CHARGER2_BATTERY_CURRENT, &batteryData ); resultsLogger(); mikrobus_logWrite( "", _LOG_LINE ); Delay_ms( 1000 ); }
Additional Functions:
void resultsLogger()
- Logs the desired data for the battery charging status.The full application code, and ready to use projects can be found on our Libstock page.
Other mikroE Libraries used in the example:
Additional notes and information
Depending on the development board you are using, you may need USB UART click, USB 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.