27220 Parallax Inc, 27220 Datasheet - Page 176

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
Taking It Further
The DS1620 has thermostat outputs that can be used to control other devices.
These outputs are typically used in stand-alone mode, but will also work
autonomously when the DS1620 is connected to the BASIC Stamp or another host.
Connect two LEDs to the DS1620 THi and TLo outputs as shown below:
With the LEDs connected, add the following code after the DS1620 initialization:
Behind the Scenes
The THi output will go high when the current temperature is at or above the value
stored in the high-temperature register.
current temperature is at or below the low-temperature register.
Set_Alarms:
HIGH Reset
tC = (THi - 32 */ $008E) * 2
SHIFTOUT DQ, Clock, LSBFIRST, [WrHi, tC\9]
LOW Reset
PAUSE 10
HIGH Reset
tC = (TLo - 32 * 5 / 9) * 2
SHIFTOUT DQ, Clock, LSBFIRST, [WrLo, tC\9]
LOW Reset
PAUSE 10
The TLo output will go high when the
' convert to 0.5 C
' write high temp
' write low temp

Related parts for 27220