mcp73213 2.0.0.0
|
MCP73213 click carries the MCP73213 dual-cell Li-Ion/Li-Polymer battery charge management controller with input overvoltage protection from Microchip.
We provide a library for the Mcp73213 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 form compilers IDE(recommended way), or downloaded from our LibStock, or found on mikroE github account.
This library contains API for Mcp73213 Click driver.
- Initialization function.void mcp73213_cfg_setup ( mcp73213_cfg_t *cfg );
MCP73213_RETVAL mcp73213_init ( mcp73213_t *ctx, mcp73213_cfg_t *cfg );
- Get the status register data functionvoid mcp73213_set_current_output ( mcp73213_t *ctx, uint8_t out_data );
uint8_t mcp73213_get_status ( mcp73213_t *ctx );
float mcp73213_convert_output ( uint8_t value_adc, float v_ref );
This application is polymer battery charge management controller.
The demo application is composed of two sections :
Initialization driver enable's - SPI, also write log.
This is a example which demonstrates the use of MCP73213 Click board. This example sets the resistance to a given value, thus affecting the output current. Controls output current using internal digital potentiometer. Results are being sent to the Usart Terminal where you can track their changes. All data logs write on usb uart changes for every 3 sec.
The full application code, and ready to use projects can be installed directly form compilers IDE(recommneded) or found on LibStock page or mikroE GitHub accaunt.
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.