charger23  2.1.0.0
Main Page

Charger 23 click

Charger 23 Click is a compact add-on board providing a single-cell battery charging solution. This board features the ISL78693, a single-cell Li-ion or Li-polymer battery charger from Renesas. The ISL78693 can operate with an input voltage as low as 2.6V and works as a linear charger with the battery charged in a Constant Current/Constant Voltage (CC/CV) profile. The charge current is selectable with an external resistor between 250 and 500mA. Additional features include the preconditioning of an over-discharged battery, an NTC thermistor interface for charging the battery in a safe temperature range, automatic recharge, and more.

click Product page


Click library

  • Author : Stefan Filipovic
  • Date : Nov 2022.
  • Type : GPIO type

Software Support

We provide a library for the Charger 23 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 23 Click driver.

Standard key functions :

Example key functions :

Example Description

This example demonstrates the use of Charger 23 click board by enabling the device and then reading and displaying the charger status.

The demo application is composed of two sections :

Application Init

Initializes the driver and enables the device.

void application_init ( void )
{
log_cfg_t log_cfg;
charger23_cfg_t charger23_cfg;
LOG_MAP_USB_UART( log_cfg );
log_init( &logger, &log_cfg );
log_info( &logger, " Application Init " );
// Click initialization.
charger23_cfg_setup( &charger23_cfg );
CHARGER23_MAP_MIKROBUS( charger23_cfg, MIKROBUS_1 );
if ( DIGITAL_OUT_UNSUPPORTED_PIN == charger23_init( &charger23, &charger23_cfg ) )
{
log_error( &logger, " Communication init." );
for ( ; ; );
}
charger23_enable_device ( &charger23 );
log_info( &logger, " Application Task " );
}

Application Task

Reads the charger state and displays it on the USB UART on change.

void application_task ( void )
{
static uint8_t chg_state_old = CHARGER23_STATE_UNKNOWN;
uint8_t chg_state = charger23_get_charger_state ( &charger23 );
if ( chg_state_old != chg_state )
{
chg_state_old = chg_state;
log_printf( &logger, "\r\n Charger state: " );
switch ( chg_state )
{
{
log_printf( &logger, "Charge completed with no fault (Inhibit) or Standby\r\n" );
break;
}
{
log_printf( &logger, "Charging in one of the three modes\r\n" );
break;
}
{
log_printf( &logger, "Fault\r\n" );
break;
}
default:
{
log_printf( &logger, "Unknown\r\n" );
break;
}
}
Delay_ms ( 100 );
}
}

Note

Depending on the CURR SEL onboard jumper position this click board is able to charge batteries of 250mAh or 500mAh rated capacity.

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.Charger23

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.


charger23_cfg_t
Charger 23 Click configuration object.
Definition: charger23.h:106
CHARGER23_STATE_CHARGING
#define CHARGER23_STATE_CHARGING
Definition: charger23.h:60
charger23_enable_device
void charger23_enable_device(charger23_t *ctx)
Charger 23 enable device function.
CHARGER23_STATE_IDLE
#define CHARGER23_STATE_IDLE
Definition: charger23.h:61
application_task
void application_task(void)
Definition: main.c:63
CHARGER23_MAP_MIKROBUS
#define CHARGER23_MAP_MIKROBUS(cfg, mikrobus)
MikroBUS pin mapping.
Definition: charger23.h:80
application_init
void application_init(void)
Definition: main.c:32
CHARGER23_STATE_FAULT
#define CHARGER23_STATE_FAULT
Definition: charger23.h:59
charger23_get_charger_state
uint8_t charger23_get_charger_state(charger23_t *ctx)
Charger 23 get charger state function.
charger23_init
err_t charger23_init(charger23_t *ctx, charger23_cfg_t *cfg)
Charger 23 initialization function.
charger23_disable_device
void charger23_disable_device(charger23_t *ctx)
Charger 23 disable device function.
charger23_cfg_setup
void charger23_cfg_setup(charger23_cfg_t *cfg)
Charger 23 configuration object setup function.
charger23_t
Charger 23 Click context object.
Definition: charger23.h:93
CHARGER23_STATE_UNKNOWN
#define CHARGER23_STATE_UNKNOWN
Charger 23 charger state setting.
Definition: charger23.h:58