More adresses in TWI(10-bit)

I would like to know if there is any chance that the Wire library will support 10-bit adresses. I need a lot of Atmegas in my project, so the next question would be: Is I2C fast enough with that many slaves, or is there a better alternative?

If I remeber corrcetly i2C allows 127 devices on a network. :S

Thx for the quick reply. Anyways, I would like to know if theres a similar bus I could use. It should be adressable and have decent speed to.

Most (all?) other busses don't have inbuild addressing.

Maybe stick with I2C but add an extention to the address, IE several devices respond to address N and the first byte of the data packet is used to differentiate. Only good for intelligent devices of your own design of course.


Rob

I'm probably gonna try to add an extra adress byte rather than using a totally different protocol. However, I'm not sure how to implement that for master to slave requests. Could someone be so kind to help me out. I don't know if my usual solution would work.

PS: Its not easy to write from a car using an iPhone :)

You have 2^10 Arduinos? Most impressive.

If I may suggest, use the "broadcast address" (which is zero). I describe how to do that here:

http://www.gammon.com.au/forum/?id=10896

Then you could have as many as you want "listening" for the broadcast. Then the first two bytes of the broadcast message can be the device number you actually want to talk to.

eg.

Wire.beginTransmission (0);  // broadcast to all
Wire.send (0x41);
Wire.send (0x42);    // device 0x4142 respond!
Wire.send (4);      // carry out action 4
Wire.endTransmission ();

However I think with 1024 Arduinos connected together you will have electrical issues. Like, the capacitance over the wiring, the ability of the master to drive that many slaves, that sort of thing.