STC3115_driver.h Software Source Code

STC3115



Below is the STC3115_driver.h software source code.

The STC3115 is a fuel gauge IC for lithium ion batteries made by STMicroelectronics.

The STC3115_driver.h source code contains register definitions and structure definitions needed for a microcontroller and the STC3115 to be able to communicate with each other via the I2C bus protocol.

This source code contains the slave address for the STC3115 chip, as well as the various internal registers that need to be read from the STC3115 in order to read the state of charge of the battery connected in hardware. It also features registers that can be written to such as the programmable alarm, which allows us to program the level of the low state of charge or battery voltage which triggers a low level alarm (if desired).

All values in this source code corresponds to values that can be found on the datasheet for the STC3115, which can be found here: STC3115 Gas Gauge IC

This source code is designed for guidance only.







Related Resources



HTML Comment Box is loading comments...