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: 2019-09-30
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: Battery Charger
Downloaded: 2866 times
Not followed.
License: MIT license
Charger 13 Click is a single lithium-ion (Li+) cell battery charger. This click can be used for Low-Cost Li-Ion battery chargers, or Power Tools, toys, backup energy storage solutions, etc.
Do you want to subscribe in order to receive notifications regarding "Charger 13 click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "Charger 13 click" changes.
Do you want to report abuse regarding "Charger 13 click".
Library Description
The library covers all the necessary functions to control Charger 13 Click board. The library contains a function which enables or disable charging and check battery charging states.
Key functions:
void charger13_enable()
- Enable the charging function.void charger13_disable()
- Disable the charging function.uint8_t charger13_check()
- Check battery charging functionExamples description
The application is composed of three sections :
void applicationTask()
{
char receivedData;
if ( UART_Rdy_Ptr() )
{
receivedData = UART_Rd_Ptr();
switch ( receivedData )
{
case 'E' :
{
if ( enableFlag == 0 )
{
enableFlag = 1;
charger13_enable();
mikrobus_logWrite( "Charging Status : Enabled", _LOG_LINE );
mikrobus_logWrite( "-------------------------", _LOG_LINE );
}
break;
}
case 'D' :
{
if ( enableFlag == 1 )
{
enableFlag = 0;
charger13_disable();
mikrobus_logWrite( "Charging Status : Disable", _LOG_LINE );
mikrobus_logWrite( "-------------------------", _LOG_LINE );
}
break;
}
}
}
if ( charger13_check() != chargerFlag )
{
chargerFlag = charger13_check();
if ( chargerFlag == 0 )
{
mikrobus_logWrite( " Battery is charging ", _LOG_LINE );
mikrobus_logWrite( "-------------------------", _LOG_LINE );
}
else
{
mikrobus_logWrite( " Battery does not charge ", _LOG_LINE );
mikrobus_logWrite( "-------------------------", _LOG_LINE );
}
}
}
Other mikroE Libraries used in the example:
Additional notes and informations
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.