but when I call i2c_poll() it returns always false and the function exit in time out.
Instead if I use immediately the i2c_read() I read the Temperature sensor correctly.
Why i2c_poll doesn't work ?
thanks
rnielsen
Joined: 23 Sep 2003 Posts: 852 Location: Utah
Posted: Wed Sep 19, 2007 9:04 am
Read the help file regarding i2c_poll() again. It indicates that this function will only return a TRUE if the hardware has received a byte in the buffer. You're not doing anything to get a byte into the buffer. I've never used i2c_poll() before but I believe this function may be intended to be used in a PIC set up as a Slave.
Look over the data sheet, for the LM92, and see if there is any instructions on how to detect errors reading the sensor. Quite often you can tell if the sensor is talking/locked up by trying to talk to it and detecting an ACK.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum