Another Brisk Day Today!
Temperature measurement with the ATM18 and a 1-wire bus
Materials
Extra info / Update
February 18, 2009
owing to a pagination error the final text block of the article was not printed on page 52. It is rendered below.
You can now read out a single byte, or all eight bytes at once in order to increase the temperature resolution (Rom(1) = 1wread(8)).
You can increase the temperature resolution by evaluating the seventh byte (COUNT REMAIN) of the set of read bytes. It contains a value in the range of 1 to 16, which must be interpreted as sixteenths of a degree. However, you must be careful here because the least significant bit of the low byte of the ‘regular’ temperature reading (0.5 degree) is the same as the most significant bit of the Count Remain register. This means that you must first round to whole degrees and then add the sixteenths count.
The best possible resolution is thus 0.06 degree, so the result is displayed with two digits after the decimal point. Naturally, the final digit should be treated with caution, since you should always make a clear distinction between accuracy and resolution. The actual accuracy is approximately 0.5 °C in the range from –55 °C to + 85 °C. However, the enhanced resolution makes it easier to recognise very small temperature changes. If you hold two sensors in close thermal contact and compare their displayed readings, you will see that the difference is usually less than 0.1 °C.
(080641-I)
[1] http://en.wikipedia.org/wiki/Temperature
[3] http://datasheets.maxim-ic.com/en/ds/DS18S20.pdf
Discussion (0 comments)