|
BQ2085 Datasheet, PDF (22/56 Pages) Texas Instruments – SBS-COMPLIANT GAS GAUGE IC FOR USE WITH THE bq29311 | |||
|
◁ |
bq2085
SLUS541 â OCTOBER 2002
PEC Protocol (Continued)
1
7
1
ÃÃÃÃ ÃÃÃÃ ÃÃÃÃ ÃÃÃÃ S
Battery Address
0001011
0
1
8
1
A Command Code A
8
1
8
1
Data Byte Low A Data Byte High A
8
PEC
Write Word
1
7
11
8
11
7
11
ÃÃÃÃ ÃÃÃÃ ÃÃÃÃÃÃ S
Battery Address
0001011
0
A Command Code A
S Battery Address 1
A
11
ÃÃÃÃA P
8
1
8
1
ÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃ Data Byte Low A Data Byte High A
8
PEC
11
AP
Read Word
1
7
11
8
11
7
11
ÃÃ ÃÃ ÃÃÃ S Battery Address 0 A Command Code A S Battery Address 1 A
ÃÃ ÃÃ ÃÃÃ 0001011
8
1
ÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃ ÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃ ByteCount= N A
8
1
Data Byte 1 A
8
1
Data Byte 2 A
8
1
Data Byte N A
8
PEC
11
AP
Block Read
Host Processor
ÃÃÃÃÃÃbq2083
A â ACKNOWLEDGE
A â NOT ACKNOWLEDGE
S â START
P â STOP
Figure 7. SMBus Communication Protocol With PEC
PEC Calculation
The basis of the PEC calculation is an 8-bit cyclic redundancy check (CRC-8) based on the polynomial
C(X) = X8 + X2 + X1 + 1. The PEC calculation includes all bytes in the transmission, including address,
command, and data. The PEC calculation does not include ACKNOWLEDGE, NOT ACKNOWLEDGE, start,
stop, and repeated start bits.
For example, the host requests RemainingCapacity( ) from the bq2085. This includes the host following the read
word protocol. The bq2085 calculates the PEC based on the following 5 bytes of data, assuming the remaining
capacity of the battery is 1001 mAh.
D Battery Address with R/W = 0: 0x16
D Command Code for RemainingCapacity( ): 0x0f
D Battery Address with R/W = 1: 0x17
D RemainingCapacity( ): 0x03e9
For 0x160f17e903, the bq2085 transmits a PEC of 0xe8 to the host.
PEC Enable in Master Mode
PEC for master mode broadcasts to the charger, host, or both can be enabled/disabled with the combination
of the bits hpe and cpe in Pack Configuration DF 0x28.
22
www.ti.com
|
▷ |