Thanks Bruce!
I was talking with someone else off forum that had problems using the conversion routines with a DS1820 and negative temperatures, so I came up with this.He said it worked, but I haven't tried it myself.Code:Sign VAR BIT TempC VAR WORD Sign = temperature.15 TempC = ABS(temperature) TempC =(TempC>>1)*10 + (TempC.0 * 5) IF Sign then TempC = 0 - TempC
HTH,
Darrel
Bookmarks