readtemp and readtemp(12) commands

gavina

New Member
As the owin/owout commands do not function with the '08' chips it would be useful if the readtemp/readtemp12 commands could return an error (value outside the temperature range of -50 to 125) if the adderssed sensor was faulty or not present.
 

hippy

Ex-Staff (retired)
It's highly unlikely that this will be added to existing 08M chips as this would require additional firmware space.

It seems from a quick test that the 08M will read zero when the sensor is not connected so in many circumstances, though not all, this could be used as an indication of missing sensor.

It seems that READOWSN also returns all zeroes when not connected, and probably a value which fails CRC checking when faulty, so this is another possible option.
 

Technical

Technical Support
Staff member
The last byte of readowsn is the family code (for which the DS18B20 family code is $28). Therefore it is very easy to check that the sensor is working and present - just look for the $28 in the family byte of the serial number. If something else, like $00 or $FF, is returned instead then there is a problem.
 

gavina

New Member
It's highly unlikely that this will be added to existing 08M chips as this would require additional firmware space.

It seems from a quick test that the 08M will read zero when the sensor is not connected so in many circumstances, though not all, this could be used as an indication of missing sensor.

It seems that READOWSN also returns all zeroes when not connected, and probably a value which fails CRC checking when faulty, so this is another possible option.
The last byte of readowsn is the family code (for which the DS18B20 family code is $28). Therefore it is very easy to check that the sensor is working and present - just look for the $28 in the family byte of the serial number. If something else, like $00 or $FF, is returned instead then there is a problem.
Silly me - I hadn't discovered READOWSN.

Tried it and it does the job.

Thanks.
 
Top