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.

BQ27426: Format of data returns, specific access of bits, "extra" bytes

Part Number: BQ27426

Hi all,

I have three questions. If you all can help me in some way that would be greatly appreciated!

1.

What is the format for the data that the fuel gauge returns after being sent a read bit? For example, after sending bytes in the sequence 

0xAA 0x00 0x08
0xAB

(i.e. address+write=>control_register=>chem_id_register=>address+read), what information will be in the byte that chem_id_register returns (e.g. a number ID/a letter ID for the chemistries)? Is there some sort of table that lists all of the corresponding information that the bytes contain after the fuel gauge returns them? I'm very confused, because I want to interpret the data returned from, say, the chem_id; however, I cannot interpret it because I do not know what the data tells me.

2.

How does one access the values of specific bits from designated registers? For example, in the Flags() register 0x06 and 0x07, how does one interpret the value of the low byte of Bit 4 (i.e. CFGUPMODE) through the returned byte? Is there a special sequence of send bytes that will pick only the data from the low byte of Bit 4 and return it or does it return an amalgamation of all of the bits together?

3.

Why are there two "extra" bytes sent after the read command in the application example (the quotations mean that I am not completely sure if they are extra due to my own lack of knowledge on the subject)? For example, in the application example,

the pseudocode implies that the host sends 0x00 (control_register) 0x08 (chem_id_register) 0x00 (unknown byte). What is the purpose of the unknown byte? Why doesn't it just stop after the register? Please explain the rd command to me.

Note: I am a complete amateur at the I2C protocol. Please correct me if I'm wrong.

Note 2: I currently do not have testing materials and I am mainly going off theoretical knowledge from the datasheet. I am programming an ATtiy24a using an Arduino as an ISP.

Again, thanks so much for your help!

Jonathan