Shop OBEX P1 Docs P2 Docs Learn Events
DS1620 Thermostat — Parallax Forums

DS1620 Thermostat

SteveDSteveD Posts: 64
edited 2005-02-25 05:06 in Learn with BlocklyProp
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

Comments

  • edited 2005-02-20 15:43
    Pages 22 through 24 of those product docs show the codes that you can send the DS1620 to confitgure it. Take a closer look at page 24. The first six rows in the table look like they can be done in PBASIC like this:

    shiftout DQ,CLK,lsbfirst,[noparse][[/noparse]$0C, $00, $01, $0050 \ 16]
    PAUSE 10
    shiftout DQ,CLK,lsbfirst,[noparse][[/noparse]$21, $0014 \ 16]
    PAUSE 10
  • achilles03achilles03 Posts: 247
    edited 2005-02-21 00:23
    Here's some modified code I use. Sometimes on startup and after configuring, it will shiftout 0 the first time. I don't know if it's something with the chip or with my code, but here's what I use:

    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
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2005-02-21 05:02
    I have a note on the thermostat mode posted at this URL:

    www.owlogic.com/OL2d1620.htm#thermostat

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • SteveDSteveD Posts: 64
    edited 2005-02-25 05:06
    Thanks to everyone! I now have it working.
    Steve
Sign In or Register to comment.