> I plan to build a system comprised of one 16F877 (I2c master), one LCD > display (I2C slave), one serial EEPROM (I2C slave) and up to 8 x 16F628 > slaves as well. > > ... > > I haven't used I2C in any of my projects yet and before I start going > through the MicroChip and Phillips datasheets I would have liked some input > on the feasability of such a project using the I2C bus. Your plan sounds workable, but there are a few points to keep in mind: 1 - I would only use IIC if all the devices you mentioned are physically close, on the same board or in the same closed box. 2 - I wouldn't run the IIC bus faster than 400Kbits/Sec due to the Microchip MSSP bug and the capacitor on SDA as a workaround. See archives. 3 - The Microchip MSSP module doesn't allow for a slave to slow down a read (slave to master) transfer. The slave had better respond with a byte when the master asks for one. On a write transfer the slave can avoid being overrun with the clock stretch feature, but this isn't available for reads for some reason. > - Given the number of components I plan to use will handling the traffic be > a software nightmare or does the PIC's hardware SSP do part of the job ? I wouldn't call it a nightmare, but you will have to design it carefully and be awake when you're writing the code. > - Is collision detection and handling very hard to implement No, because there can never be collisions. All transfers are initiated by the master. The trick will be for the master to know when a slave has data for the master to read. You also don't want the bus to stall for very long, so the master also probably needs to know that a slave has room in its buffer for a whole input packet before one is sent. One way to do this is for the master to poll each of the slaves in turn with a short message the only requests a status byte. The master would only send or receive a packet to a slave when it knows the slave is ready to do so. ******************************************************************** Olin Lathrop, embedded systems consultant in Littleton Massachusetts (978) 742-9014, olin@embedinc.com, http://www.embedinc.com -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics