ok , I get that now,
I want to concentrate on the cold but not that cold part for now.. the sensor is sticking outsid now, its about -11C
I wanted to see what was behing calculated..
The 2's compliment, the binary value gives me a good degree (tempc)
when I put it in the equation it then screws up, I think the 2 byte count_per_c AND count_remain and different since it is in negative mode... hummm
Nothing is siad about this in the specsheet either, and the program on Rentron does not use that part.
here is the code:
Zerotemp: '------------- cases when zero celcius and positive Fahrenheit
temp1 = temperature
temperature = ( ~ temperature ) + 1 '----- do this later, right before displaying it
tempc =temperature
temperature = ((( temperature ) *100)- 25) + (((count_per_c - count_remain) * 100) / count_per_c)
tempF = ((temperature /5) * 9) + 3200
if tempF <= 0 then goto ZeroF
lcdout $FE,1, dec temp1 , ".", dec temperature ," ",$DF,"C"
lcdout $FE,$C0, dec temperature, dec tempc , ".", dec tempc/2 ," ",$DF,"F"
temperature," ",$DF,"C"
goto loop




Bookmarks