I2C Target Address – What Does It Mean and Can We Address Individual Registers?

i2c

The I2C specification says the addressed target device responds to the 7 or 10 bit target address. And the data transfer is always in 8 bits. Then, does it mean all the I2C target devices just provide one byte data? If I want to access for example 4 32-bit registers using I2C, and if my target device has the target address for example 0x34, how can I read/write the registers? The specification doesn't clearly mention about this.

Best Answer

The specification only defines how to talk to a device, reading and writing bytes to it.

The specification does not define what the bytes mean. It is up to your chips to define the protocol at byte level.

Some chips don't have any registers so they have just single data byte.

Some chips don't have any registers but you send command packets to it and read response packets.

Some chips have registers. Some chips have 8-bit register addresses so they use one byte of index, some chips have 16-bit register addresses so they use two bytes of index.

And depending on chip, the registers may be 8, 16, 24 or 32 bits long.

So how to use a specific chip is in the chip data sheet, not in I2C specifications.