Electronic – Determine I2C read time

i2c

I'd like to determine how fast I can read sensor values on a bus given the bus rate/bandwidth. According to the device documentation found here, assuming a 7-bit address there are 49 bits involved in sending & reading a single sensor temperature value. A picture is also shown here.
enter image description here
Would the transfer rate simply be 49 bits / 100kbps = 0.00049 seconds / read?

Best Answer

Disregarding start, restart and stop conditions, that transaction is 6 bytes times 9 bits. If the PEC is optional, it's 5 bytes * 9 bits = 45 bits. The start, restart, and stop conditions may not equal a bit in duration, but can be roughly approximated as equaling a bit. So I count 48 bits, and in practice there is some software overhead.

So your estimation of 49 bits is approximately right, you can read a 16-bit word from the chip about 2040 times per second, or about every 0.49 milliseconds.

Keep in mind that this is the theoretical maximum throughput of the bus. Any other things that the software does will slow it down, and also if the slave needs to stretch the clock to slow down the communications.