Thermostat with DS1620
Hello Everyone:
I have a DS1620 and a BS2SX and I need a standalone
thermostat, I wrote this program:
DQ con 0
CLK con 1
RST con 2
StartC con $EE
WConfig con $0C
RConfig con $AC
noCPU con $00
Cont con $00
RhiT con $A1
WhiT con $01
RloT con $A2
WloT con $02
dirs=%111111111111111
low RST
high CLK
pause 100
high RST
pause 1
shiftout
DQ,CLK,lsbfirst,WConfig,0,WhiT,$50,Wlot,$14,StartC]
high CLK
pause 10
low RST
pause 20
high RST
pause 100
low CLK
pause 50
high CLK
but the DS1620 didn't nothing. I think that the
problem is the time of the BS2sx but I'm not sure.
What can I do?
=====
Alberto Zamora Estrada.
Phone: (506) 220-6736.
Cell: (506) 374-3846.
Fax: (506) 220-8684
Investigaci
I have a DS1620 and a BS2SX and I need a standalone
thermostat, I wrote this program:
DQ con 0
CLK con 1
RST con 2
StartC con $EE
WConfig con $0C
RConfig con $AC
noCPU con $00
Cont con $00
RhiT con $A1
WhiT con $01
RloT con $A2
WloT con $02
dirs=%111111111111111
low RST
high CLK
pause 100
high RST
pause 1
shiftout
DQ,CLK,lsbfirst,WConfig,0,WhiT,$50,Wlot,$14,StartC]
high CLK
pause 10
low RST
pause 20
high RST
pause 100
low CLK
pause 50
high CLK
but the DS1620 didn't nothing. I think that the
problem is the time of the BS2sx but I'm not sure.
What can I do?
=====
Alberto Zamora Estrada.
Phone: (506) 220-6736.
Cell: (506) 374-3846.
Fax: (506) 220-8684
Investigaci
Comments
>Hello Everyone:
>
>I have a DS1620 and a BS2SX and I need a standalone
>thermostat, I wrote this program:
>
>DQ con 0
>CLK con 1
>RST con 2
>StartC con $EE
>WConfig con $0C
>RConfig con $AC
>noCPU con $00
>Cont con $00
>RhiT con $A1
>WhiT con $01
>RloT con $A2
>WloT con $02
>
>dirs=%111111111111111
>low RST
>high CLK
>pause 100
>high RST
>pause 1
>shiftout
>DQ,CLK,lsbfirst,WConfig,0,WhiT,$50,Wlot,$14,StartC]
>high CLK
>pause 10
>low RST
>pause 20
>high RST
>pause 100
>low CLK
>pause 50
>high CLK
>
>but the DS1620 didn't nothing. I think that the
>problem is the time of the BS2sx but I'm not sure.
>What can I do?
Hola Alberto,
Each command must be sent in its own shiftout sequence.
high RST
shiftout DQ,CLK,lsbfirst,[noparse][[/noparse]WConfig,0] ' set standalone mode
low RST
pause 10 ' this has to come after the "low RST" not before!
Similarly, the two sequences to set the hi and lo thresholds have to
be sent in a sequence just like the above
shiftout DQ,CLK,lsbfirst,[noparse][[/noparse]WhiT,$50] ' with the RSTs and the pause
shiftout DQ,CLK,lsbfirst,[noparse][[/noparse]Wlot,$14] ' again with the RSTs and the pause
You don't need to send the StartC command, because this is
standalone mode. Also, the stuff to set the clock is probably not
necessary, because the shiftout command takes care of that. Leave in
the dirs=%111111111111111.
I hope that helps,
-- Tracy Allen
electronically monitored ecosystems
http://www.emesystems.com
I read the e-mail and I wrote this program:
DQ con 0
CLK con 1
RST con 2
WConfig con $0C
RConfig con $AC
noCPU con $00
Cont con $00
RhiT con $A1
WhiT con $01
RloT con $A2
WloT con $02
dirs=%111111111111111
low RST
high CLK
pause 100
high RST
shiftout DQ,CLK,lsbfirst,[noparse][[/noparse]WConfig,0]
low RST
pause 10
high RST
shiftout DQ,CLK,lsbfirst,[noparse][[/noparse]WhiT,$50]
low RST
pause 10
high RST
shiftout DQ,CLK,lsbfirst,[noparse][[/noparse]WloT,$14]
low RST
pause 10
but it didn't work, when I download the program the
T(hi) goes high, the T(lo) goes low and the T(com)
goes high.
I don't know what happens. Pleasde help me.
Thanks
Hola Alberto,
>
> Each command must be sent in its own shiftout
> sequence.
>
> high RST
> shiftout DQ,CLK,lsbfirst,[noparse][[/noparse]WConfig,0] ' set
> standalone mode
> low RST
> pause 10 ' this has to come after the "low RST"
> not before!
>
> Similarly, the two sequences to set the hi and lo
> thresholds have to
> be sent in a sequence just like the above
>
> shiftout DQ,CLK,lsbfirst,[noparse][[/noparse]WhiT,$50] ' with the
> RSTs and the pause
>
> shiftout DQ,CLK,lsbfirst,[noparse][[/noparse]Wlot,$14] ' again
> with the RSTs and the pause
>
> You don't need to send the StartC command, because
> this is
> standalone mode. Also, the stuff to set the clock
> is probably not
> necessary, because the shiftout command takes care
> of that. Leave in
> the dirs=%111111111111111.
>
> I hope that helps,
> -- Tracy Allen
> electronically monitored ecosystems
> http://www.emesystems.com
>
>
>
>
=====
Alberto Zamora Estrada.
Phone: (506) 220-6736.
Cell: (506) 374-3846.
Fax: (506) 220-8684
Investigaci
>Thanks Tracy:
>
>I read the e-mail and I wrote this program:
>
>DQ con 0
>CLK con 1
>RST con 2
>WConfig con $0C
>RConfig con $AC
>noCPU con $00
>Cont con $00
>RhiT con $A1
>WhiT con $01
>RloT con $A2
>WloT con $02
>
>dirs=%111111111111111
>low RST
>high CLK
>pause 100
>high RST
>shiftout DQ,CLK,lsbfirst,[noparse][[/noparse]WConfig,0]
>low RST
>pause 10
>high RST
>shiftout DQ,CLK,lsbfirst,[noparse][[/noparse]WhiT,$50]
>low RST
>pause 10
>high RST
>shiftout DQ,CLK,lsbfirst,[noparse][[/noparse]WloT,$14]
>low RST
>pause 10
>
>but it didn't work, when I download the program the
>T(hi) goes high, the T(lo) goes low and the T(com)
>goes high.
>
>I don't know what happens. Pleasde help me.
Hola Alberto,
I forgot to say that the breakpoints need to be sent as 9 bits:
shiftout DQ,CLK,lsbfirst,[noparse][[/noparse]WhiT,$50\9]
and
shiftout DQ,CLK,lsbfirst,[noparse][[/noparse]WloT,$14\9]
That should set the thresholds at
25 degrees C, pin 7 high above that value
7 degrees C, pin 6 high below that value
pin 5 goes high above 25, then stays high until it goes back below 7.
And one more thing: be sure to cycle the power off and then back on
after you program it. The '1620 reads its config bits only at
power-up.
-- Tracy