> -----Original Message----- > From: Donovan Parks [SMTP:dparks@UVIC.CA] > Sent: Thursday, April 26, 2001 11:49 PM > To: PICLIST@MITVMA.MIT.EDU > Subject: [PIC]: Having 16f877 talk to each other. > > Hello, > > I need a bunch (max 6) 16f877 pic's to be able to talk to each other. > From > the literature on the Microchip site I gather I can use SSP with > SPI(Master > Mode) and I2C(Master/Slave). Is this the only(best) way to have my pic's > talk? What are the benefits of SPI to I2C? > > Thanks for all help. > > Donovan > The advantages of SPI are: higher bit rate (Megabits/s possible on some devices), more simple and robust protocol (i.e. no start or stop conditions). It is also more simple to bit bash SPI in software than I2C. The downsides of SPI are: Chip Select wire needed for every slave device. If you have several slaves, you'll be using up pins on your PIC pretty quickly. It sounds like you are going to require a Multimaster bus, which is possible with I2C and Microchip even have an app note on this. I don't know about SPI and multi-master systems, it should be possible with some kind of arbitration. However, if your network 'o' PIC's really need to talk to each other, i.e. any PIC and send and recieve to/from any other PIC, then SPI is going to be hard work to implement. I'd suggest sticking to I2C. Regards Mike -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads