If you want to read from the I2C bus you have to:
- Send start condition
- Send 7 bit slave address with R/W being a '0' which indicates a write
- Send register number where you want to read from
- Send start condition again
- Send 7 bit slave address with R/W being a '1' which indicates a read
- Slave sends data to master and master will send an ACK after each byte
- When done, the master sends a stop condition
Why isn't it done like this:
- Send start condition
- Send 7 bit slave address with R/W being a '1' which indicates a read
- Send register number where you want to read from
- Slave sends data to master and master will send an ACK after each byte
- When done, the master sends a stop condition
Wouldn't this be more efficient?
Best Answer
Michael gave you the formal response, which is how I2C is defined. The practical problem with your approach is that you fix the register address at 8 bytes. What if a slave
If you address these issues, you end with a protocol that depends on the type of slave. That would complicate matters considerably.