DS1620 Thermostat
SteveD
Posts: 64
I have used the source code (Basic Stamp 2)·from the AppKit: Using the DS1620 Digital Thermometer/Thermostat and have been able to see it work as a thermometer.· I am having trouble underatanding how to get it to function as a thermostat.· I do not understand how to write the high and low temperature settings into the DS1620 to cause it to act as a stand alone thermostat.
Could someone please guide me in the right direction so I can understand?· PLEASE!!!
Thank you,
Steve
Could someone please guide me in the right direction so I can understand?· PLEASE!!!
Thank you,
Steve
Comments
shiftout DQ,CLK,lsbfirst,[noparse][[/noparse]$0C, $00, $01, $0050 \ 16]
PAUSE 10
shiftout DQ,CLK,lsbfirst,[noparse][[/noparse]$21, $0014 \ 16]
PAUSE 10
DQ CON 4 'DS1620 DQ pin
CLK CON 5 'DS1620 CLOCK pin
RST CON 6 'DS1620 RST pin
'DS1620 CONSTANTS
WCONFIG CON $0C
CPU CON %10
CONT CON %00
STARTC CON $EE
STOPC CON $22
RTEMP CON $AA
'START DS1620
LOW RST
HIGH CLK
PAUSE 100
HIGH RST
SHIFTOUT DQ,CLK,LSBFIRST,[noparse][[/noparse]WCONFIG,CPU+CONT]
LOW RST
PAUSE 50
HIGH RST
SHIFTOUT DQ,CLK,LSBFIRST,[noparse][[/noparse]STARTC]
PAUSE 500
GETTEMP:
temp2=0
HIGH RST
SHIFTOUT DQ,CLK,LSBFIRST,[noparse][[/noparse]RTEMP]
SHIFTIN DQ,CLK,LSBPRE,[noparse][[/noparse]temp2\9]
LOW RST
debug temp, cr
pause 1000
goto GETTEMP
www.owlogic.com/OL2d1620.htm#thermostat
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
Steve