When you use an Arduino Uno, then you have a 5V I2C bus.
The interface of the TAS3251 runs at 3.3V, so it has a 3.3V I2C bus.
The maximum voltage on the SDA and SCL pins of the TAS3251 is VDAC_DVDD + 0.5, that is 3.8V.
The first thing to do is to run a I2C Scanner sketch, to check if the I2C bus is working.
The I2C of the TAS3251 works just as any other normal I2C device. For writing, first the 8-bit register-address is written, then one or more data bytes. For reading, the register-address is written, then a repeated start and then the databytes are read.
First the register-address is written, then the data bytes. The first byte with "Wire.write()" is always the register address.
You can also not concatenate more than one command.
I don't know if this is right, but it should look more like this:
// Go to page 0
Wire.beginTransmission( 0x4B); // TAS3251 I2C address
Wire.write( 0x00); // register address 0
Wire.write( 0x00); // select page 0
Wire.endTransmission( );
// Change the book to 0x8C
Wire.beginTransmission( 0x4B); // TAS3251 I2C address
Wire.write( 0x7F); // register address 0x7F
Wire.write( 0x8C); // select 0x8C book
Wire.endTransmission( );
// Write 0x00 to register address 0x30
Wire.beginTransmission( 0x4B); // TAS3251 I2C address
Wire.write( 0x30); // register address 0x30 (in book 0x8C)
Wire.write( 0x00); // data 0x00 (to 0x30 register)
Wire.endTransmission( );
Should the page be set, after the book 0x8C is selected ?
When a I2C Scanner finds a device, then the next step is to read an identifier from the chip.
Register 0x58 has device ID of 0x84.
Wire.beginTransmission( 0x4B);
Wire.write( 0x58); // register address 0x58 is DIEI (chip ID)
Wire.endTransmission( false); // false for a repeated start
Wire.requestFrom( 0x4B, 1); // request 1 byte
int id = Wire.read();
Serial.print( "ID = 0x");
Serial.println( id, HEX);
I don't know if register 0x58 can be selected just like that, or should first a book and a page be selected ?
What about the difference in voltage levels on the I2C bus ?
Koepel:
The interface of the TAS3251 runs at 3.3V, so it has a 3.3V I2C bus.
The maximum voltage on the SDA and SCL pins of the TAS3251 is VDAC_DVDD + 0.5, that is 3.8V.