dear all, i m interfacing 24c16an with c8051f120. i have sck and sda on p0.6 and p0.7 when i dont enable the crossbar for smbus, these lines toggle as normal port pins but when i enable the crossbar that time my smb0cr register is configured at 100Khz i.e i m using communication at 100Khz but still i notice that SCK line doesnot toggle as clock line it is steady at 3V i.e supply to ic. i check the hardware, there is no short to any supply i did P0 = 0xff as initialisation, and made then open drain. but still the sck line is steady, no clock seen on it. due to this i get NAK and my communication stops pls suggest the solution. in case any doubts pls let me know thank you all
Do the lines have pullups?
hi thankx for reply yes these lines have pullups of 2.2Kohm i have made all pins as opendrain using crossbar register i.e weak pullup disable option = 0 in XBR2 register but still the problem is same thank you regards
Just a wild guess, but should you make them open-drain first, and then write 0xFF...?
Surely, SiLabs must provide examples of using their I2C - have you looked at them?
thankx for reply, i have made them opendrain and then 0xff is written. i checked the sample program and it is similar to my code. i m getting problem immediately after transfering device address.i get nak after this step. can you suggest me from hardware point of view? microcntroller pins to 24c64 and sda and sck hav pullup of 2.2KOHM thank you take care
"Similar" is not "same" - so look at the differences!
Have you actually used (not just "looked at") the sample? Again, if you have the sample working, you can then look at he differences from your own code...
Are you using a Devkit, or your own hardware?
i have made them opendrain and then 0xff is written. in the F12x/f13x when setting the crossbar to include IIC the SCL and SDA pins are automatically made open drain and set to 0xff and you can not write to them.
if you can do either, you have crossbar misalignement.
Erik