Max speed of I2C between two Arduinos?

I'd like to communciate from and Arduino UNO to many (maybe 10) Colorduinos (which are based on Ardunio duemilanove).

The following calcs are just to give me an idea of the speed I can get.

It looks like I2C is ideal. But I am worried about speed. Imagine the worst case situation where I need to address 512 3 color leds to get the effect I am after. That is 512x3 = 1536 bytes,

I2C specs say that the standard speed is 100KHz, so if the Arduino supports that speed this means (very roughly assuming 10 bits per byte transfer) I have a speed of 10KBytes per second.

And this would mean I could update the 512 leds 1536/10000 = 0.15 times per second.

Are my calculations right? I plan on implementing higher level commands inside the Colorduino, but the worst case is 3 bytes per LED.

(bytes/set) / (bytes/second) = (bytes/set) * (second/bytes) = second/set
So, it would take 0.15 seconds to update the whole set of values, or roughly 7 times per second.

PaulS:
(bytes/set) / (bytes/second) = (bytes/set) * (second/bytes) = second/set
So, it would take 0.15 seconds to update the whole set of values, or roughly 7 times per second.

Thanks for confirming my rough calcs!

Ciao,

You can change also increase the speed I2C by changing the frequency in the file libraries\Wire\utility\twi.h .

For example to change from 100 to 400 kHz

search

  #ifndef TWI_FREQ
  #define TWI_FREQ 100000L
  #endif

and replace with

  #ifndef TWI_FREQ
  #define TWI_FREQ 400000L
  #endif

Pay attention that I2C was not developed for long distance data communication (8 m by design, if I remeber well).

Ciao,
Marco.