What is the speed of I2C for AVR communication?

As Oli said, 100 kbits/s and 400 kbits/s are "standard" IIC bus speeds. However in practise in most cases the IIC bus speed is limited by the signal rise times. Both lines are passively pulled high, and these pullups are limited to 3 mA, so the rising edges will take some time.

Real IIC chips are only obligated to overcome 3 mA of pullup current to get a line below the maximum logic low threshold. However, if you know exactly what's connected to the bus and what pulldown capability it really has, you can use stiffer pullups and therefore run faster. Check the current sink capabilities of the output pins used to drive the IIC bus on the micros you are using. Most likely they can sink significantly more than 3 mA. With stiff pullups and a short IIC bus all on the same board, you should be able to get up to 1 Mbit/s or more since IIC is ultimately synchronous.

Experiment with the parts you have and look at the waveforms on a scope to see what they are capable of. Remember, this is only valid if all devices on the bus can do this. If you hook up a dedicated IIC chip, like a EEPROM for example, then you should stick to the standard.


Most devices with I2C capability nowadays can handle the two lowest nominal datarates which are 100kbps and 400kbps.

The ATTiny seems to be capable of both of these according to this app note.

So assuming everything is perfect you will be able to transfer 400,000 / 8 = 50 kilobytes per second. Allowing for overheads like addressing/negotiation it will probably be a little under this. If you want an exact figure (for your particular application) it wouldn't be hard to set a little test up using a timer to time sending x bytes.

Tags:

Arduino

Avr

I2C