its working good, now, I think I have a problem with the 2,s compliment, working on it
I am just doing 2,s compliment, I get all 1,s at the output
Zerotemp:
temperature = temperature >> 1 'removing lowest bit
temperature1 = temperature
for counter=0 to 6 ' 2's compliment, starting to invert all the digits
if temperature.0[counter] = 1 then temperature.0[counter] =0
if temperature.0[counter] = 0 then temperature.0[counter] =1
next counter
'temperature = temperature + 1 ' 2,s compliment ends by adding a one
'temperature = ((( temperature >> 1) *100)- 25) + (((count_per_c - count_remain) * 100) / count_per_c)
'tempc = (((temperature *9) / 5) + 3200)
lcdout $FE,1, "TempC: ", bin temperature1, ".", dec2 temperature," ",$DF,"C"
lcdout $FE,$C0, "TempF: ", bin temperature , ".", dec2 (tempF // 100)," ",$DF,"F"
goto loop
Bookmarks