27220 Parallax Inc, 27220 Datasheet - Page 178

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
EXPERIMENT #30: HIGH RESOLUTION TEMPERATURE
MEASUREMENT
This experiment demonstrates advanced use of the DS1620 temperature sensor,
allowing for high resolution (0.05 degrees C) measurements.
Building the Circuit
Use the circuit from Experiment #29.
Program: SW21-EX30-DS1620-HiRes.BS2
' {$STAMP BS2}
' {$PBASIC 2.5}
' -----[ Program Description ]---------------------------------------------
'
' This program measures temperature using the Dallas Semiconductor DS1620
' temperature sensor. Resolution is <0.05 degrees Celsius.
'
' NOTE: After downloading program, power must be cycled for proper
'
' -----[ I/O Definitions ]-------------------------------------------------
DQ
Clock
Reset
' -----[ Constants ]-------------------------------------------------------
RdTmp
WrHi
WrLo
RdHi
RdLo
RdCntr
RdSlope
StartC
StopC
WrCfg
RdCfg
DegSym
operation.
CON
CON
CON
CON
CON
CON
CON
CON
CON
CON
CON
CON
CON
CON
CON
0
1
2
$AA
$01
$02
$A1
$A2
$A0
$A9
$EE
$22
$0C
$AC
186
' 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

Related parts for 27220