hi sir, i'm using lpc3250, with this i'm interfacing LM81 and it is i2c protocol ,while reading the buffer values of i2c it is going to the while loop means strucking or hanging there it self. Thanks & Regards G. Madhu krishna
Good: you know what's wrong - you can get on and fix it...
hi sir, can you suggest me why it is hanging there . with the same code i'm working with eeprom (ATC64k)and it is also i2c protocol and it is working properly. why not working in LM81 and i changed the configuration to LM81.
Thanks & Regards G. Madhu krishna
You may check datasheets. Maybe wrong baudrate. Maybe protocol error somewhere. Maybe made incorrect assumption somewhere. The open issue is: what have _you_ done to figure out what differs? What have you done to verify that your implementation really matches the requirements mentioned in the datasheet for the specific I2C device?
Do you think I can see your code?
Without seeing your code, how can I possibly suggest anything other than You need to look at it, think about it, and debug it?!
You say you have a while loop, and your code is getting "stuck" in it.
Obviously, If it's stuck in the while loop, then the loop exit conditions are not being met - so you need to figure out why not!
Nobody else can do that for you, because nobody else can see your while loop!
"same code i'm working with eeprom (ATC64k) and it is also i2c protocol and it is working properly"
Think of it like a telephone line: A telephone line can be used by a person to call another person, or by a fax machine to call another fax machine, or by a modem to call another modem.
In all cases, the telephone line is the same and the procedure for accessing it is the same - but the stuff that's exchanged over the link is different.
Similarly, I2C provides a connection that can be used by both your EEPROM and your LM81 - but you also need to send the right stuff over that connection.
It is also possible that your basic I2C is faulty - but in a way that just happens not to matter with the EEPROM.