27220 Parallax Inc, 27220 Datasheet - Page 181

BOOK STAMPWORKS

27220

Manufacturer Part Number
27220
Description
BOOK STAMPWORKS
Manufacturer
Parallax Inc
Datasheet

Specifications of 27220

Accessory Type
Booklet
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Not applicable / Not applicable
For Use With/related Products
StampWorks
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Not applicable / Not applicable
Moving Forward · Page 171
cycle and comparing this to another register called the slope accumulator.
The
purpose of the slope accumulator is to correct the non-linear behavior of the
oscillators over temperature.
For high-resolution temperature measurements we can read the temperature,
remove the half-degree bit (which was estimated by the DS1620 circuit), and then
calculate the fractional portion using the values from the slope and counts remaining
registers. The following equation is used to derive high-resolution temperature from
the DS1620:
tC = (tempIn / 2) – 0.25 + ((slope – remaining) / slope)
To use the DS1620 in this mode requires a slightly different initialization sequence: in
order to read the slope and counts remaining registers, the DS1620 must be
programmed for one-shot mode.
Note that if the DS1620 had been previously
programmed for continuous conversion (as in Experiment #29) the power must be
cycled after reprogramming for one-shot mode before the DS1620 will respond
properly.
In one-shot mode the temperature is read by sending the StartC command ($EE)
and then continuously reading the configuration register until Bit7 goes high – this
indicates the end of the conversion cycle.
When the cycle is complete the
temperature, counts remaining, and slope registers can be read from the DS1620.
Note that the configuration register that is used to signal the end of the conversion
also holds flags for the THi and TLo outputs of the DS1620.
The high resolution conversion begins by removing the half-degree bit – this is
accomplished by shifting tempIn right by one (When dividing or multiplying by
powers of two (2, 4, 8, 16, …) it is more efficient to use shift operators instead of *
or /). The next step is to extend the sign bit so that tempIn holds a correct 16-bit
value. The shift operation just used has moved the sign bit; it is now located in Bit7.
The temperature is then converted to 100ths to maintain the resolution available
from the process, and the equation above is applied to derive tC. Note that the
parameters of the high-resolution have also been converted for 100ths.
If the
current temperature was 23.75 degrees C, tC would now hold 2375.

Related parts for 27220