Thank you for replays !!!
I wish to all a happy NEW YEAR 2009 !
I think I go crazzy with this little thermostat probleme ; I write ( based on Yours great codes) four routines ; everyone display a different temperature. Which of them is -in yours opinion - the best ?
1.OWOut DQ, 1, [$CC, $BE]
OWIn DQ, 2, [Temperature.Lowbyte, Temperature.Highbyte]
Convert_Temp:
Dummy = 625 * Temperature
TempC = DIV32 10
TempC = (Temperature & $7FF) >> 4
Float = ((Temperature.Lowbyte & $0F ) * 25 )>>2
Temperature = TempC*100 + Float
2.OWOut DQ, 1, [$CC, $BE]
OWIn DQ, 2, [RAWTEMP.Lowbyte, RAWTEMP.Highbyte]
Convert_Temp:
dummy = RAWTEMP * 625
TempC = DIV32 100
Temperature = TempC
3.OWOut DQ, 1, [$CC, $BE]
OWIn DQ, 2, [Temperature.Lowbyte, Temperature.Highbyte]
Convert_Temp:
TempC = (Temperature & $7FF) >> 4
Float = ((Temperature.Lowbyte & $0F ) * 25 )>>2
Temperature = TempC*100 + Float
4.OWOut DQ, 1, [$CC, $BE]
OWIn DQ, 0, [Temperature.LowByte, Temperature.HighByte, Skip 4, Count_Remain, Count_Per_C]
Convert_Temp :
Temperature = (((Temperature >> 1) * 100) - 25) + (((Count_Per_C - Count_Remain) * 100) / Count_Per_C)
if Temperature > 32767 then '32767 check if BIT12=1
Temperature= ~Temperature
temperature=temperature>>3 ; divide by 8
Thanks in advance for your support ; I hope I don't became boring !!!!