Keywords:
Related Parts |
These accuracies are very good as far as temperature sensors go, but there are situations where the 0.5°C resolution is not adequate. In proportional control systems where the absolute temperature is not as critical as the trend in temperature, greater resolution may be required.
Using some undocumented test modes for the DS1620 allows the user to provide 0.1°C resolution with the DS1620 and some overhead software. While this does not increase the accuracy of the device, it may provide better control of some systems by having finer resolution of temperature.
The DS1620 measures temperature by counting the number of clock cycles that an oscillator with a low temperature coefficient goes through during a gate period determined by a high temperature coefficient oscillator. The counter is preset with a base count that corresponds to -55°C. If the counter reaches zero before the gate period is over, the temperature register, which is also preset to the -55°C value, is incremented, indicating that the temperature is higher than -55°C.
At the same time, the counter is then preset with a value determined by the slope accumulator circuitry. This circuitry is needed to compensate for the parabolic behavior of the oscillators over temperature. The counter is then clocked again until it reaches zero. If the gate period is still not finished, then this process repeats.
The slope accumulator is used to compensate for the nonlinear behavior of the oscillators over temperature, yielding a high resolution temperature measurement. This is done by changing the number of counts necessary for the counter to go through for each incremental degree in temperature. To obtain the desired resolution, therefore, both the value of the counter and the number of counts per degree C (the value of the slope accumulator) at a given temperature must be known.
Internally, this calculation is done inside the DS1620 to provide 0.5°C resolution. Note that temperature is represented in the DS1620 in terms of a 1/2°C LSB, yielding the following 9-bit format:
Higher resolutions may be obtained by reading the temperature and truncating the 0.5°C bit (the LSB) from the read value. This value is TEMP_READ. The value left in the counter may then be read. This value is the count remaining (COUNT_REMAIN) after the gate period has ceased. By loading the value of the slope accumulator into the count register, this value may then be read, yielding the number of counts per degree C (COUNT_PER_C) at that temperature. The actual temperature may be then be calculated by the user using the following:
Figure 1. Temperature Measuring Circuitry
Protocol to set both ONESHOT and CPU modes:
0C 03 (hex)
Protocol to set only ONESHOT mode:
0C 01 (hex)
The first protocol listed above is usually the desired mode setting when using a computer to control the DS1620.
(config & 0x80) = = 0x80
TEMPERATURE=TEMP_READ - 0.25
+ (COUNT_PER_C - COUNT_REMAIN) /
COUNT_PER_C
Notes:
See Application Note 105 for sample C code. The code can be downloaded from Dallas Semiconductor's anonymous FTP site.