27220 Parallax Inc, 27220 Datasheet - Page 172

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
DQ
Clock
Reset
' -----[ Constants ]-------------------------------------------------------
RdTmp
WrHi
WrLo
RdHi
RdLo
RdCntr
RdSlope
StartC
StopC
WrCfg
RdCfg
DegSym
' -----[ Variables ]-------------------------------------------------------
tempIn
sign
tC
tF
' -----[ Initialization ]--------------------------------------------------
Setup:
' -----[ Program Code ]----------------------------------------------------
Main:
HIGH Reset
SHIFTOUT DQ, Clock, LSBFIRST, [WrCfg, %10]
LOW Reset
PAUSE 10
HIGH Reset
SHIFTOUT DQ, Clock, LSBFIRST, [StartC]
LOW Reset
DEBUG CLS,
DO
"DS1620 ", CR,
"---------"
CON
CON
CON
CON
CON
CON
CON
CON
CON
CON
CON
CON
CON
CON
CON
VAR
VAR
VAR
VAR
0
1
2
$AA
$01
$02
$A1
$A2
$A0
$A9
$EE
$22
$0C
$AC
186
Word
tempIn.BIT8
Word
Word
' DS1620.1 (data I/O)
' DS1620.2
' DS1620.3
' read temperature
' write TH (high temp)
' write TL (low temp)
' read TH
' read TL
' read counter
' read slope
' start conversion
' stop conversion
' write config register
' read config register
' degrees symbol
' raw temperature
' 1 = negative temperature
' Celsius
' Fahrenheit
' alert the DS1620
' use with CPU; free-run
' start conversions

Related parts for 27220