85 deg C is the default value after power up (or reset) before a temperat= ure=20 conversion has been done. I have an application where the sensor can be r= emoved=20 during conversion so I have to know if it has been removed and power cycl= ed=20 after a temperature conversion command has been sent. I also use 2 wire=20 interface (parasite power). This is how I have solved it and it seems to = be=20 working OK. 1. Do a recall EE to read the alarm trigger values into the scratchpad.=20 2. Read the scratchpad. 3. Invert the alarm trigger values and remember the values. 4. Write back the scratchpad (without copying it to EEPROM) 5. Do a temperature conversion and wait the time required by the selected= =20 resolution. 6. Read the scratchpad. 7. If the alarm trigger values still are the same as the values written t= o the=20 scratchpad (which is the inverted value of the EEPROM) the temperature is= good. Of course also check the CRC after every read. This is based on the fact that the EEPROM is copied to the scratchpad on = power=20 up and if the scratchpad has changed back to the data in EEPROM after a=20 temperature conversion, power is most likely cycled to the sensor and the= =20 temperature is not valid. Regards / Ruben > I've implemented some 1-Wire code to read a DS18B20 sensor using a PIC,= using=20 > parasite power. Still in testing on a breadboard, it sits there all da= y with=20 > 2 sensors on the bus reading ~28 deg C. But periodically, perhaps once= every=20 > few hours, I get an odd value of "85", or "-21" once interpreted from t= he=20 > DS18B20's format. Seemingly important, this works out to B'10101010', = and=20 > even more important is that it passes the checksum test. >=20 > I can now reproduce this by removing the positive power from the sensor= . And=20 > it's always that magic "85". Is there some significance to this, so th= at I=20 > can figure out how to determine it's bogus and not display 85? I can't= find=20 > any reference to this value or bit pattern being generated when power t= o the=20 > chip is lost or otherwise. That it's passing the checksum test is real= ly=20 > bothering me. >=20 > Cheers, > -Neil. >=20 >=20 >=20 > --=20 > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist >=20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D Ruben J=F6nsson AB Liros Electronic Box 9124, 200 39 Malm=F6, Sweden TEL INT +46 40142078 FAX INT +46 40947388 ruben@pp.sbbs.se =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist