For TI bq40z50 fuel gauge
1. What is the value of the PEC check?
2. What is the calculation logic of the check value?
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
For TI bq40z50 fuel gauge
1. What is the value of the PEC check?
2. What is the calculation logic of the check value?
Hello Jason,
You can follow the SMBus protocol for the PEC calculation, the gauge follows SMBus spec.
This tool will calculate the PEC byte: http://www.sunshine2k.de/coding/javascript/crc/crc_js.html
The SMBus specification: http://smbus.org/specs/smbus110.pdf
From the spec:
The PEC is a CRC-8 error-checking byte, calculated on all the message bytes (including addresses and read/write bits). The PEC is appended to the message by the device that supplied the last data byte.
Sincerely,
Wyatt Keller
Hello Jason,
Glad this helped. Make sure you mark as resolved if this helped so the thread will close.
Sincerely,
Wyatt Keller