> The problem is when I try to read a data byte from the PIC. > I get the read request, writes my data byte to SSPBUF. > I reenable the clock by setting CKP. The data is output, > but the first bit (msb) is missing. > If I insert a looong delay (10-20ms) at my PC before I read > and take SCL high, the SDA will change at the same time as SCL. > > Hevard Txrring Hello Hevard, I had such a problem with dodgy MSBs. I found SDA rising at the same time as SCL. Therefore the SDA setup time was not being satisfied. I had a look at fig 11-19 of the PIC data book. SDA becomes D7 when SSPBUF is loaded. SCL rises when CKP is set. You must wait about 5 microseconds between these two events. That fixed it for me.