1
\$\begingroup\$

I have understood how the I2C protocol works. The I2C protocol specifies three modes, namely 100kbps (original speed), 400kbps (fast mode) and 3.4 Mbps (high speed mode). One thing I didn't understand is the relationship between the clock speed and the bus data transfer speed.

If you want to say send data on the bus at a rate of 100kbps, what should be the clock speed to be decided between transmitter and receiver?

\$\endgroup\$
  • \$\begingroup\$ because all the transfer on the bus happens with respect to the clock,so have got doubt . \$\endgroup\$ – Santhosh Pai Mar 24 '14 at 8:43
6
\$\begingroup\$

Except for the overhead it takes for the Start and Stop conditions, acknowledge bits, and device address plus R/W bit, they are the same.

So the more data that is sent per message, the closer the data rate will be to the clock speed. For very short messages (one address byte and one data byte), the data rate will be a little less than 50% of the clock rate. For very long messages, it will be more like 90%.

enter image description here

\$\endgroup\$
  • \$\begingroup\$ So for example if i have to send data at the rate of 100 kbits/sec then the clock speed should be around 0.9*100khz ? Please correct me if i'm wrong \$\endgroup\$ – Santhosh Pai Mar 24 '14 at 9:16
  • 1
    \$\begingroup\$ Other way around -- the clock speed has to be higher than the data rate, because of the overhead. If you want to send data at an average rate of 100 kb/s, you would set the clock speed higher -- anywhere from 110 to 150 kHz depending on the message length. Note that some I2C devices can't handle more than 100 kHz (although they are becoming rarer), so you could never achieve 100 kb/s. \$\endgroup\$ – tcrosley Mar 24 '14 at 9:21
  • \$\begingroup\$ This is the best explanation i could get on the internet ,thanks @tcrosley sir . \$\endgroup\$ – Santhosh Pai Mar 24 '14 at 9:23
  • 1
    \$\begingroup\$ @David This is a dangerous proposal. Devices that are designed to operate on a 100 kHz I2C bus may fail miserably when the bus is operated at 400 kHz or 1000 kHz, regardless of the average clock frequency. \$\endgroup\$ – Joe Hass Mar 25 '14 at 16:12
  • 1
    \$\begingroup\$ @JoeHass a fair point, I did of course mean within the specs of the device. \$\endgroup\$ – David Mar 25 '14 at 16:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.