Nicholas wrote: > In the case I will get, SSPADD = 24; //400KHZ Baud clock @ 40MHz > > Am I correct to say that? Yes you are correct. > I have rewrite the I2C_inital as shown below. I added in the > SSPCON1 which I > miss out at first. But I do not know whether the C18 complier command > OPENI2C(MASTER, SLEW_ON) is the same as using SSPCON1. Since I have never used the Microchip C18 C compiler, I don't know how much of the low level details those library functions encapsulate. You really need to see the source code (or resultant assembly language) behind the 'OPENI2C()' function, for example, to see what's really going at the register level. Best regards, Ken Pergola -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu