| Electronic Components Datasheet Search |
|
UM1836 Datasheet(PDF) 11 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
UM1836 Datasheet(HTML) 11 Page - STMicroelectronics |
|
11 / 16 page ![]() UM1836 How to use the driver DocID027146 Rev 1 11/16 4 How to use the driver There are three basic steps to using the driver. They are • Hardware initialization • Software initialization • Periodic update of the battery state These steps are described in more detail in the three sections below. 4.1 Hardware initialization 1. Update the I2C_Write and I2C_Read functions in the stc3115_I2C.c file with the I 2C driver functions of the application. 2. Initialize the STC3115 dedicated hardware externally from the driver (e.g. the I 2C interface, GPIOs, etc). 4.2 Software initialization 1. Fill the STC3115_Battery.h file with the battery and application parameters 2. Declare one STC3115_ConfigData_TypeDef structure and one STC3115_BatteryData_TypeDef parameter structure. 3. At application start-up, call once only the GasGauge_Initialization function with un- initialized structures as parameters. This: − Fills the STC3115_ConfigData_TypeDef structure with STC3115_Battery.h data. − Fills the STC3115_BatteryData_TypeDef structure with the STC3115 algorithm results which returns the battery state to the application. GasGauge_initialization function • Initialize the software structures • Check the battery history, for example, is it a new battery, a swapped battery, or is the battery already connected? • Initialize the STC3115 registers according to the battery history • Initialize the RAM memory of the STC3115 according to the battery history GasGauge_initialization returns • (-1) indicates that the STC3115 cannot be accessed. Either the I 2C bus is not properly configured or the STC3115 is not power supplied. • (0) indicates that initialization has been successful |
|
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |