I2C Communication (bq27750 from TI)

Hello,
I’m not sure if this is the right place to ask my question, but I’m not currently going through the I2C protocol of my TI chip “bq27750” (fuel gauge for battery status).
I have attached the manual to you… (Page 49 etc.)

For example, if I want to read the current voltage value, I understand the protocol as sending 0x55 as address, then sending 0x08 and 0x09 to get the correct register and then getting the answer. Is that right?

I have programmed the following code for this:

      Wire.beginTransmission(0x55);
      Wire.write(0x08);
      Wire.write(0x09);

      Wire.requestFrom(0x55, 2);

      if (2 <= Wire.available()) { // if two bytes were received
        reading = Wire.read();  // receive high byte (overwrites previous reading)
        reading = reading << 8;    // shift high byte to be high 8 bits
        reading |= Wire.read(); // receive low byte as lower 8 bits
        Wire.endTransmission();
        Serial.println(reading);   // print the reading
        Serial.println("\n");
        Serial.println(reading, DEC);   // print the reading
      }
      else
      {
        Wire.endTransmission();
      }

If I use this, I get the protocol from the attachment. (see picture)
It feels like the Arduino is twisting something or the chip is coming before my Arduino. Because you can see that the address is being sent, but first the Arduino goes into read mode and then into write mode to send the bytes. What am I doing wrong?

I just want to address the registers and then read out the values…

Manual.pdf (714 KB)

I believe you must send the Wire.endTransmission() to send the actual data.Then try to ask data from it

Wire.beginTransmission(0x55);
Wire.write(0x08);
Wire.write(0x09);
Wire.endTransmission();
Wire.requestFrom(0x55, 2, true) ;

Yeah, I think you’re right.

I have already changed the code as follows:

     Wire.beginTransmission(0x55);
     Wire.write(0x08);
     Wire.write(0x09);
     Wire.endTransmission();
     Wire.requestFrom(0x55, 2);
     while(Wire.available()==0);
     int c = Wire.read();
     Serial.println(c);

How do I get the right output values? (see picture = protocol)
I get 16 bits back, how do I make the correct integer value out of it and can I get it output?
In this case I would have to get the value 144.
But I’m getting nonsense out…

Sorry guys…
I just solved my problem myself.

     Wire.requestFrom(0x55, 2);
     while(Wire.available()==0);
     byte c1 = Wire.read();
     byte c2 = Wire.read();
     int c = int(c1 << 8) + int(c2);
     Serial.println(c);
     Serial.println("\n");

The chip doesn’t output the correct value, but I think it’s a configuration thing.