Electronic Components Datasheet Search
  English  ▼

X  

UM1836 Datasheet(PDF) 11 Page - STMicroelectronics

Part # UM1836
Description  STSW-BAT001 open source driver for the STC3115
PDF  16 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  STMICROELECTRONICS [STMicroelectronics]
Direct Link  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

UM1836 Datasheet(HTML) 11 Page - STMicroelectronics

Back Button UM1836 Datasheet HTML 7Page - STMicroelectronics UM1836 Datasheet HTML 8Page - STMicroelectronics UM1836 Datasheet HTML 9Page - STMicroelectronics UM1836 Datasheet HTML 10Page - STMicroelectronics UM1836 Datasheet HTML 11Page - STMicroelectronics UM1836 Datasheet HTML 12Page - STMicroelectronics UM1836 Datasheet HTML 13Page - STMicroelectronics UM1836 Datasheet HTML 14Page - STMicroelectronics UM1836 Datasheet HTML 15Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 11 / 16 page
background image
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



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16


Datasheet Download

Go To PDF Page


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


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
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