I am trying to do a differential ttemp program for solar water collectors ( time is getting critical as temp drops)
I have a simple program using the readadc command but in order to use the readtemp required for the ds18b20 sensors I am missing something. When I try to use the generic input on the simulator it toggles both sensors, when I try to toggle a seperate variable it doesn't work.
I have tried changing the variables in case I am using the wrong inputs but need help asap please.
(code)
main: ;14m basic diff controller installed sept 6 09
readtemp 1 ,b0 ; outside sensor
readtemp 2 ,b1 ; inside sensor
b1= b1+4
if b0 >b1 then top
low 0
low 5
goto main
top:
high 0
goto main
bot:
low 0
goto main
(code)
hope I have done this right
tx
I have a simple program using the readadc command but in order to use the readtemp required for the ds18b20 sensors I am missing something. When I try to use the generic input on the simulator it toggles both sensors, when I try to toggle a seperate variable it doesn't work.
I have tried changing the variables in case I am using the wrong inputs but need help asap please.
(code)
main: ;14m basic diff controller installed sept 6 09
readtemp 1 ,b0 ; outside sensor
readtemp 2 ,b1 ; inside sensor
b1= b1+4
if b0 >b1 then top
low 0
low 5
goto main
top:
high 0
goto main
bot:
low 0
goto main
(code)
hope I have done this right
tx