On Tue, 2009-04-07 at 08:59 +0100, Alan B. Pearce wrote: > >So, one possible outcome is, that after reading all these replies, > >you may decide that polling ain't so bad after all. This all is > >quite an adventure for an i2c first-timer. > > There is an alternative to polling, doing a token passing to determine who > is master. It will require each master to know the next address of who may > want to be a master in the system, to know who to pass the 'master' token > to, but that could be set up by a broadcast message from the 'master > master'. I hadn't thought of token passing, it might be useful if the collision detection doesn't work well enough.... It will be a totally static system so "next address" can be hard coded without a problem. > This will save the overhead of one device doing all the polling. Each device > 'just' needs to look for the message that passes the master token, and if it > doesn't require access to other devices, it passes the token on to the next > potential master. I shall think about this, but right now I have the simpler task of an RS-232 interface to the host to implement. PeterO -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist