Quote Originally Posted by lerameur View Post
I made these formulas and tested them on a calculator. it works. I dont know hy it do not work on the pogram I wrote.
So
ZeroF: ' cases when zero celcius and 0 Fahrenheit
temperature = ((( temp ) *100)- 25) + (((count_per_c - count_remain) * 100) / count_per_c)
tempF = 3200 -((temperature /5) * 9)

--- SO if I need to do the conversion : -17C to 1.4F
so I take 1700 (17 *100) put it in the formula (temperature) I get 140, just divide by 100 to get the answer..

k

Zerotemp: ' cases when zero celcius and positive Fahrenheit
temperature = temperature >> 1 'removing lowest bit
temperature1 = temperature
for counter = 0 to 6
if temperature.0[counter] = 1 then
temperature.0[counter] = 0
else
temperature.0[counter] = 1
endif
next counter



------------------------------------temp value right here not set up
temp = temp + 1 ' 2,s compliment ends by adding a one
temp = temp >> 5

temperature = ((( temp ) *100)- 25) + (((count_per_c - count_remain) * 100) / count_per_c)
tempF = 3200 -((temperature /5) * 9)
if tempF = 0 then goto ZeroF

lcdout $FE,1, "TempC: ", "-", dec (temperature / 100) , ".", dec2 temperature," ",$DF,"C"
lcdout $FE,$C0, "TempF: ", dec (tempF / 100) , ".", dec2 tempF ," ",$DF,"F"
goto loop

ZeroF: ' cases when zero celcius and 0 Fahrenheit
temperature = ((( temp ) *100)- 25) + (((count_per_c - count_remain) * 100) / count_per_c)
tempF = 3200 -((temperature /5) * 9)

lcdout $FE,1, "TempC: ", "-", dec (temperature / 100) , ".", dec2 temperature," ",$DF,"C"
lcdout $FE,$C0, "TempF: ", "-", dec (tempF / 100) , ".", dec2 tempF ," ",$DF,"F"

goto loop

Where is the first temp getting set at? I don't think it is. I think it's always $ab (left over $aa from the serin with 1 added).