rq3
Senior Member
The DS18B20 measures in centigrade. Assuming that the lowest temperature I need to measure is -20 C, can I do something like:
readtemp B.0, b0
b0=b0+50
to internally shift the readtemp so that it will always be a positive value? In other words, will the picaxe deal with the negative sign bit on the readtemp byte without further code manipulation (twos complement,etc.), or will it "roll over" as soon as it sees a negative temperature measurement?
Thanks!
Rip
readtemp B.0, b0
b0=b0+50
to internally shift the readtemp so that it will always be a positive value? In other words, will the picaxe deal with the negative sign bit on the readtemp byte without further code manipulation (twos complement,etc.), or will it "roll over" as soon as it sees a negative temperature measurement?
Thanks!
Rip