Datasheet

DS1922L/DS1922T
Temperature Logger iButton with 8KB
Data-Log Memory
50 ______________________________________________________________________________________
Software Correction Algorithm
for Temperature
The accuracy of high-resolution temperature conver-
sion results (forced conversion as well as temperature
logs) can be improved through a correction algorithm.
The data needed for this software correction is stored
in the calibration memory (memory page 18, duplicated
in page 19). This data consists of reference tempera-
ture (T
r
) and conversion result (T
c
) for two different tem-
peratures. See the
Temperature Conversion
section for
the binary number format.
The software correction algorithm requires two addi-
tional values, which are not stored in the device. These
values, Tr1 and Offset, are derived from the device
configuration byte.
The correction algorithm consists of two steps: prepa-
ration and execution. By means of the family code the
preparation step verifies whether the device actually is
a DS1922. Then the configuration byte is checked to
identify the type of DS1922 (L or T). If it is the correct
device, the data for software correction is read and
converted from binary to decimal °C format. Next,
three coefficients A, B, and C are computed. In the
execution step, the temperature reading as delivered
by the DS1922 is first converted from the low-
byte/high-byte format (TcL, TcH) to °C (T
c
) and then
corrected to T
CORR
. Once step 1 is performed, the
three coefficients can be used repeatedly to correct
any temperature reading and temperature log
of the
same device
.
ADDRESS DESIGNATOR DESCRIPTION
0240h Tr2H Cold-reference temperature, high byte
0241h Tr2L Cold-reference temperature, low byte
0242h Tc2H Conversion result at cold-reference temperature, high byte
0243h Tc2L Conversion result at cold-reference temperature, low byte
0244h Tr3H Hot-reference temperature, high byte
0245h Tr3L Hot-reference temperature, low byte
0246h Tc3H Conversion result at hot-reference temperature, high byte
0247h Tc3L Conversion result at hot-reference temperature, low byte
Step 1. Preparation
Read the 64-bit ROM to obtain the family code. If family code 41h, then stop (wrong device).
Read the configuration byte at address 0226h.
If code = 40h, then Tr1 = 60, Offset = 41 (DS1922L)
If code = 60h, then Tr1 = 90, Offset = 1 (DS1922T)
For all other codes, stop (wrong device).
Tr2 = Tr2H/2 + Tr2L/512 - Offset (convert from binary to °C)
Tr3 = Tr3H/2 + Tr3L/512 - Offset (convert from binary to °C)
Tc2 = Tc2H/2 + Tc2L/512 - Offset (convert from binary to °C)
Tc3 = Tc3H/2 + Tc3L/512 - Offset (convert from binary to °C)
Err2 = Tc2 - Tr2
Err3 = Tc3 - Tr3
Err1 = Err2
B = (Tr2
2
- Tr1
2
) x (Err3 - Err1)/[(Tr2
2
- Tr1
2
) x (Tr3 - Tr1) + (Tr3
2
- Tr1
2
) x (Tr1 - Tr2)]
A = B x (Tr1 - Tr2) / (Tr2
2
- Tr1
2
)
C = Err1 - A x Tr1
2
- B x Tr1
Step 2. Execution
T
C
= TcH/2 + TcL/512 - Offset (convert from binary to °C)
T
CORR
= Tc - (A x Tc
2
+ B x Tc + C) (the actual correction)