when using i2c, i recommend to select i2c master and slave in a way, = that main traffic is sent from master to slave. this gives you an easier = i2c handling (slave does not need to slow down access speed). for the slave, I recommend to use the pic's built in i2c interface, = which is interrupt controlled (there is an application note from = microchip). for the master, you can use a bit bang routine, which, I think, is = easier to handle than the interrupt driven i2c master interface, if = there isn't a high data rate to be transferred. unfortunately, I have no basic code. tino >-----Original Message----- >From: Alan B. Pearce [mailto:A.B.Pearce@RL.AC.UK] >Sent: Friday, December 19, 2003 10:39 AM >To: PICLIST@MITVMA.MIT.EDU >Subject: Re: [PIC:] Using I2C Between 2 Pics > >>I have a circuit that has two PIC chips. >>I want one of them to be able to read data >>stored in the other using the I2C interface. >>I think I need to know the control code in order >>to do it. Does anyone know what this is? >>If it's of consequence I am using the PicBasic compiler. > >You have to make your own protocol between the two PICs. There is no >automatic read operation. > >Is it really necessary to use I2C? Using the UART would be easier to = code. > >-- >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 -- 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