28022 Parallax Inc, 28022 Datasheet - Page 7

KIT DS2760 THERMOCOUPLE

28022

Manufacturer Part Number
28022
Description
KIT DS2760 THERMOCOUPLE
Manufacturer
Parallax Inc
Datasheet

Specifications of 28022

Lead Free Status
Contains lead
Accessory Type
Thermocouple Kit
For Use With/related Products
BASIC Stamp® Modules
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
' Reads cold junction (device) temperature
' -- each raw bit = 0.125 degrees C
' -- returns tmpCJ in whole degrees C
Read_CJ_Temp:
' Search currently selected TC table for nearest entry
' -- uses modified binary algorithm to find cjComp
' -- high end of search set before calling (tblHi)
' -- successful search sets tempC
TC_Lookup:
Parallax, Inc. • DS2760 Thermocouple Kit (#28022) • 01/2004
sign = tCuV.BIT15
tCuV = tCuV >> 3
IF sign THEN
ENDIF
tCuV = ABS tCuV */ 4000
RETURN
OWOUT OW, %0001, [SkipNet, RdReg, $18]
OWIN
IF (tmpCJ.BIT15) THEN
ELSE
ENDIF
RETURN
tblLo = 0
tempC = 22
READ (tblHi * 2), Word testVal
IF (cjComp > testVal) THEN
ELSE
tCuV = tCuV | $F000
tmpCJ = 0
tmpCJ = tmpCJ.HIGHBYTE
error = 1
DO
eePntr = (tblLo + tblHi) / 2
READ (eePntr * 2), Word testVal
IF (cjComp = testVal) THEN
ELSEIF (cjComp < testVal) THEN
ELSE
ENDIF
OW, %0010, [tmpCJ.BYTE1, tmpCJ.BYTE0]
EXIT
tblHi = eePntr
tblLo = eePntr
' save sign bit
' correct alignment
' pad 2's-compliment bits
' x 15.625 uV
' check sign
' disallow negative
' >> 5 x 0.125 (>> 3)
' low entry of table
' default to room temp
' check max temp
' out of range
' midpoint of search span
' read value from midpoint
' found it!
' search lower half
' search upper half
7

Related parts for 28022