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-08-30
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: Battery Charger
Downloaded: 2840 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.
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".
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 commandvoid charger11_spi_decrement_wiper( void )
- decrements wiper position by sending 8bit decrement wiper commandfloat charger11_i2c_get_volt( float reference_voltage )
- gets raw ADC data and converts it to voltage based on reference voltage settingExamples description
The application is composed of three sections :
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 :
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.