So I’m using this chip from TI called the TAS5825M and the read operation is described as following:
I am not too familiar with I2C and mainly used it with write operations, so this is new for me. I put together this piece of code where I try to read out register 0x5E, which should give me around 42 since I am using 5V PVDD.
Wire.beginTransmission(77);
Wire.write(0x5E);
Wire.endTransmission(false); //Repeated start
Wire.requestFrom(77, 1); //Request one byte
while(Wire.available())
{
char value = Wire.read();
Serial.print(value);
}
Wire.endTransmission();
}
The logic analyzer gives this result:
Two weird things:
-The result is 0, not 42.
-Last action is a write operation again, which is not in my code. Why does this happen?
What could I be doing wrong?