4 Summary
In summary, remember the following critical aspects when implementing I2C communication between host and bq34xxx and bq35xxx gauges:
- Handshaking between the host and gauge is performed by five bit sequences: START, REPEATSTART, ACKNOWLEDGE, NO ACKNOWLEDGE, and STOP.
- The I2C address and read/write bit is the first data item sent at the beginning of an I2C packet transmission. The I2C address must not be mistaken for the command address in the gauge, the latter being the second data field to be transmitted by the host.
- The host initiates all communication to the gauge and uses the WRITE directive at the end of the I2C address (total byte is 0xAA). When followed by the gauge command, this sets the command address from which the host writes or reads gauge data.
- When reading or writing multiple bytes, the host should use the base-address auto-increment feature of the gauge, rather than specifying the gauge address location each time a byte is transferred.
- Whether command address or gauge data, all I2C data is transferred between host and gauge with the least-significant byte first.
- All bytes transferred between host and gauge is transferred most-significant bit first.