There must be something wrong in my understanding of this but I'm simply trying to
decrement the value of a variable by 1.
This is part of the code and all the variables are bytes.
I'm using a temperature probe and when it gets to a preset temperature, LCD indicates ready.
All that is working fine but when I create a variable "cunder" that should be 1 degree less I don't get my high at portb.0
All the temp readings are fine etc -- lots of code I'm not showing -- but it must be "cunder".
Other languages I've used you can simply subtract a 1 like I did. (98 becomes 97 etc).
Thanks much for any help.
if (c = 1) and (CT >= tempsetc) then
high portb.3
cunder = (tempsetc - 1)
rdy = 1
LCDOUT $FE,1, " READY"
LCDOUT $FE,$C0," Press Start" 'all this works fine
endif
if (c = 1) and (ct <= cunder) then
high portb.0 'no high with my probe at lower temp
endif
Bookmarks