Jon Petty wrote: > > Hello everyone, > > I am trying to understand the difference between I2C master and slave modes. > I thought this would be intuitive, but after looking at the data sheet for the > PIC16C74, I see that it appears only I2C slave mode is available. It mentions > I2C master mode with firmware and I am not sure what they mean by "firmware"? Mchip's claim for hardware support for I2C on PIC's is optimistic, if not bull. It is very easy to implement master mode in software, but slave mode is not trivial, because the timing constraints for the slave are much, much tighter. > > Are I2C EEPROMS and other peripherals are the I2C master? No, they are always the slaves. Your micro will be the master. > > I am looking at using I2C to communicate between two PIC processors. How do > they have two way communication if both are in slave mode? I am sure one has > to be master. The only two ways would be : 1) Place one in slave mode, and the other in master mode (do-able). 2) Place both in master mode, and implement the multi-master protocol (very hairy). The better way would be to use async comms (serial). > > I am sure I am missing something. I thought the PIC would be master and > peripherals would be slave. They are. > > I see master and slave modes for SPI, is that the best way for two PICS to > talk? Serial is better. -- Friendly Regards /"\ \ / Tjaart van der Walt X ASCII RIBBON CAMPAIGN mailto:tjaart@wasp.co.za / \ AGAINST HTML MAIL |--------------------------------------------------| | WASP International | |R&D Engineer : GSM peripheral services development| |--------------------------------------------------| |SMS mailto: tjaart@sms.wasp.co.za (160 chars max)| | http://www.wasp.co.za/~tjaart/index.html | |Voice: +27-(0)11-622-8686 Fax: +27-(0)11-622-8973| | WGS-84 : 26¡10.52'S 28¡06.19'E | |--------------------------------------------------|