27220 Parallax Inc, 27220 Datasheet - Page 179

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
' -----[ Variables ]-------------------------------------------------------
tempIn
config
done
tHiFlag
tLoFlag
busy
cRem
slope
tC
tF
' -----[ Initialization ]--------------------------------------------------
Setup:
' -----[ Program Code ]----------------------------------------------------
Main:
Display_C:
Display_F:
HIGH Reset
SHIFTOUT DQ, Clock, LSBFIRST, [WrCfg, %11]
LOW Reset
PAUSE 10
DEBUG CLS,
DO
LOOP
GOSUB Read_DS1620_HR
DEBUG CRSRXY, 0, 2,
DEBUG CRSRXY, 0, 3,
"DS1620-HR ", CR,
"----------"
(tC.BIT15 * 13 + " "),
DEC (ABS tC / 100), ".", DEC2 (ABS tC),
DegSym, " C", CLREOL
(tF.BIT15 * 13 + " "),
DEC (ABS tF / 100), ".", DEC2 (ABS tF),
DegSym, " F", CLREOL
VAR
VAR
VAR
VAR
VAR
VAR
VAR
VAR
VAR
VAR
Word
Byte
config.BIT7
config.BIT6
config.BIT5
config.BIT4
Word
Word
Word
Word
' raw temperature
' configuration register
' 1 when conversion done
' 1 when temp >= THi
' 1 when temp <= TLo
' 1 when EE update writing
' count remaining
' slope (counts per degree)
' Celsius
' Fahrenheit
' alert DS1620
' with CPU, one-shot mode
' release DS1620
' get hi-res temperature

Related parts for 27220