You are using the Wire library in a way that is not allowed.
Can you remember this:
- The Wire.beginTransmission() does not start something on the bus.
- The Wire.write() does not write something to the bus.
- The Wire.endTransmission() may not be used on its own to stop something.
Writing data is always with these three functions in this order: "beginTransmission - write - write - write - endTransmission"
See also my alternative explanation.
Normally, a I2C device has registers and a separate "register address" and any number of bytes can be read or written from any register with or without repeated start.
Instead of "register address", the TDA9950 datasheet calls that "address pointer" and it is a register itself. Very weird ![]()
Let's make things simple: Keep the "repeated start" for later, and ignore the special case where the status register can be called repeatedly without setting the register address.
Could you change your code and show the new sketch ?
Add a check before using the TDA9950:
Wire.beginTransmission(0x34);
int error = Wire.endtransmission();
if( error == 0)
{
Serial.println( "Okay, the TDA9950 is on the bus");
}
else
{
Serial.println( "Can not find the TDA9950 !");
}
Writing data is like this:
Wire.beginTransmission(0x34);
Wire.write(0x04); // Register 0x04 - REG_ACKH
Wire.write(0x00); // ACKH 00h
Wire.write(0x20); // ACKL 20h (5 HDMI 1.3a)
Wire.endTransmission();
If you request 7 bytes, then please read 7 bytes and print 7 bytes.
Wire.beginTransmission(0x34); // TDA9950 ADDRESS 0x34
Wire.write(0x07); // Register 0x07 - REG_CDR
Wire.endTransmission();
Wire.requestFrom(0x34,7);
for( int i=0; i<7; i++)
{
Serial.print( "0x");
Serial.print( Wire.read(), HEX);
Serial.print( ", ");
}
Serial.println();