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.

BQ28Z610: How to communicate via I2C

Part Number: BQ28Z610
Other Parts Discussed in Thread: BQSTUDIO, EV2400

HI,

I have been reading the technical reference SLUUA65C and the SLUA801 Gauge Communications on how to communicate with the fuel gauge. I am using an STMF4 microcontroller. I wanted to read the voltage (0x08/0x09). I transmitted the following data to slave address 0xAA:

TxBuffer[0] = 0x09;  //MSB

TxBuffer[0] = 0x08;  //LSB

TxBuffer[0] = 4;        //byte

After I issued n I2C write, I did an I2C read and displayed the details of the Rxbuffer in my hyperterminal however, the hyperterminal displays garbage characters. Can anyone please verify if I'm doing this right, 

Thanks,

Kat

  • You need to send the command to register 0x00 at address 0xAA.

    If you need drivers, you can check out,

  • Hi Batt,

    I am sending a buffer to the slave 0xAA. Can you confirm if this is the correct format:

    TxBufffer[0] = 0x00;  //Write to this register as per your response

    TxBufffer[1] = 0x09;  //Voltage() MSB Register Code as per the datasheet

    TxBufffer[2] = 0x08;  //Voltage() LSB Register Code as per the datasheet

    TxBufffer[3] = 4;  //length of Voltage() return format is U2 as per datasheet

    Thanks,

    Kat

  • Hi Kat,

    Yes, that should work.

    If it still doesn't work, if you have a logic analyzer, you can send the voltage command using bqstudio and see how the transmission is done on the line.

  • Hi Batt,

    The command sequence you verified above does not work. My company had to talk to some other TI FAE so we can send and read the data properly.

    For anyone who's new to using TI fuel gauges, refer to the Technical Reference SLUUA65C.

    To access/read the Standard Data Commands (Section 12.1 of the Technical Reference), send the Register Code LSB only.

    For example, if you want to read Voltage(), send the command 0x08 to the fuel gauge via I2C (either by ev2400 or your custom MCU).

    In reading back the values, check the technical reference for the return data format. Check Section 13 Data Flash Values of the Technical Reference to convert the read data properly. This section shows how the returned values are stored (1-byte, 2-byte, or 4-byte values in Little Endian).

    To access/read AltManufacturerAccess() in Section 12.2 0x00, 0x01 AltManufacturerAccess() and 0x3E, 0x3F AltManufacturerAccess() of the Technical Reference, I cannot find the steps to these and I've been asking other FAEs as well. I will update this post as soon as I have valid answers.

    Thanks,

    Kat

  • Thanks, Kathleen. In Altmfg access you have to send the bytes in little endian.