Charger 18 click
Charger 18 Click is a compact add-on board representing a single-cell battery charger. This board features the LTC3553, a micropower, highly integrated power management, and battery charger for single-cell Li-Ion/Polymer battery applications from Analog Devices. Designed specifically for USB applications, it also includes a PowerPath manager with automatic load prioritization and input current limit, a battery charger, and numerous internal protection features. It also indicates a battery charge state, and it comes with a synchronous 200mA buck regulator and a 150mA low dropout linear regulator (LDO).
click Product page
Click library
- Author : Stefan Filipovic
- Date : Dec 2021.
- Type : GPIO type
Software Support
We provide a library for the Charger 18 Click as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Package can be downloaded/installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.
Library Description
This library contains API for Charger 18 Click driver.
Standard key functions :
charger18_cfg_setup
Config Object Initialization function.
void charger18_cfg_setup(charger18_cfg_t *cfg)
Charger 18 configuration object setup function.
Charger 18 Click configuration object.
Definition charger18.h:121
charger18_init
Initialization function.
err_t charger18_init(charger18_t *ctx, charger18_cfg_t *cfg)
Charger 18 initialization function.
Charger 18 Click context object.
Definition charger18.h:106
Example key functions :
charger18_buck_control
This function controls the buck regulator enable state of Charger 18 click board.
void charger18_buck_control(charger18_t *ctx, uint8_t state)
Charger 18 buck control function.
charger18_ldo_control
This function controls the low dropout (LDO) regulator enable state of Charger 18 click board.
void charger18_ldo_control(charger18_t *ctx, uint8_t state)
Charger 18 ldo control function.
charger18_suspend_control
This function controls the suspend charging mode state of Charger 18 click board.
void charger18_suspend_control(charger18_t *ctx, uint8_t state)
Charger 18 suspend control function.
Example Description
This example demonstrates the use of Charger 18 click board by controlling the status of the charger as well as the LDO and BUCK regulators.
The demo application is composed of two sections :
Application Init
Initializes the driver and enables the chip with the charger, LDO and BUCK regulators disabled.
{
log_cfg_t log_cfg;
LOG_MAP_USB_UART( log_cfg );
log_init( &logger, &log_cfg );
log_info( &logger, " Application Init " );
if ( DIGITAL_OUT_UNSUPPORTED_PIN ==
charger18_init( &charger18, &charger18_cfg ) )
{
log_error( &logger, " Communication init." );
for ( ; ; );
}
log_printf( &logger, " POWER : ON\r\n" );
log_printf( &logger, " CHARGER : OFF\r\n" );
log_printf( &logger, " BUCK : OFF\r\n" );
log_printf( &logger, " LDO : OFF\r\n" );
log_info( &logger, " Application Task " );
}
#define CHARGER18_MAP_MIKROBUS(cfg, mikrobus)
MikroBUS pin mapping.
Definition charger18.h:91
#define CHARGER18_CONTROL_DISABLE
Charger 18 control state values.
Definition charger18.h:72
#define CHARGER18_CONTROL_ENABLE
Definition charger18.h:73
void charger18_power_control(charger18_t *ctx, uint8_t state)
Charger 18 power control function.
void application_init(void)
Definition main.c:29
Application Task
This function enables the charger, BUCK and LDO in the span of 25 seconds, and displays the status of each feature on the USB UART.
{
log_printf( &logger, " CHARGER : ON\r\n" );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
log_printf( &logger, " CHARGER : OFF\r\n" );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
log_printf( &logger, " BUCK : ON\r\n" );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
log_printf( &logger, " BUCK : OFF\r\n" );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
log_printf( &logger, " LDO : ON\r\n" );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
log_printf( &logger, " LDO : OFF\r\n\n" );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
}
void application_task(void)
Definition main.c:68
The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.
Other Mikroe Libraries used in the example:
- MikroSDK.Board
- MikroSDK.Log
- Click.Charger18
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. UART terminal is available in all MikroElektronika compilers.