> Sorry to confuse you! I wasn't the one that got confused. I have a number of PIC projects using IIC quite nicely. > If the user program in the slave doesn't set CKP it will not release > the clock. I didn't have the data sheet in front of me at the time, but > the key point I was trying to make is that there is a document about > the 877 I2C hardware in slave mode, and the code sample is useful > but neglects to set CKP. > > Olin, please get DS00734A and look at the slave code sample. It is > broken. It does not set CKP, so it only works for the first transfer. > Then the bus is frozen. I'm not on line right now, and I don't know which manual DS00734A is. Anyway, Microchip code samples are usually a waste of time. But you are right, a slave during a write sequence needs to set CKP after it has loaded SSPBUF with the next byte to send to the master. If it doesn't the clock will be held low and the bus will be hung. > Just reading the 877(30292) data sheet it's very difficult to get the > I2C slave working, Actually that's exactly what I recommend for learning how to program the MSSP. It, and a little common sense is what I've used to do a number of successful IIC projects. The Microchip code samples can be useless, or worse, but their data sheets are quite good. What part of the MSSP documentation don't you understand? ******************************************************************** Olin Lathrop, embedded systems consultant in Littleton Massachusetts (978) 742-9014, olin@embedinc.com, http://www.embedinc.com -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body