下载
Application Report
SLVA626B–November 2013–Revised May 2014
I
2
C Communication Sample Code for the bq76940 with a
CRC Option Based on the MSP430G2553
StevenYao
ABSTRACT
This application note describes how to communicate with the bq76940 family devices over I
2
C. The code
is based on the TI MSP430G2553. The code shows how to write the CRC function which is used to verify
the transaction integrity over the I
2
C and how to initialize the I
2
C engine of the G2553 and bq76940
registers as well as how to read binary data from the AFE registers and transfer the data to voltages.
Contents
1 Introduction ................................................................................................................... 1
2 Hardware Connection ....................................................................................................... 2
3 Sample Code................................................................................................................. 4
4 Conclusion.................................................................................................................... 6
1 Introduction
The bq76940 is a new Analog Front End (AFE) device which targets at the battery management solutions
for the applications like energy storage station, batteries for E-Motor, E-Bike, scooter or E-Tool, and so on.
It typically works with an MCU with an I
2
C interface. The MCU can directly read digital information for
individual cell voltages, battery current, and temperatures via the I
2
C bus. The basic protect actions like
overvoltage protection, undervoltage protection, overcurrent protection and short-circuit protection can be
performed by the bq76940 according the threshold programmed by the MCU during initialization of the
battery management system. The MCU is also responsible for the release of protections. The bq76940
device name is used in the document, but the communication methods described also apply to the
bq76930 and bq76920.
1
SLVA626B–November 2013–Revised May 2014
I
2
C Communication Sample Code for the bq76940 with a CRC Option Based
on the MSP430G2553
Submit Documentation Feedback
Copyright © 2013–2014, Texas Instruments Incorporated