Oops, I should have looked closer. Didn't see you're using the extended resolution. That routine was for .5 deg resolution.
OK, so when the temp drops below 32°F, it means that the °C is going negative. And negative values can't be multiplied or divided in PBP. So the "extended Resolution" formula gives the wrong answer.
Same problem with the Fahrenheit conversion, And the LCDOUT statements.
Here's what I think should work...(untested)
After reading the DS1820, change the second half of Update_Pond_Temperature: to this...Then change the lcd routine to this...Code:' Calculate Water_Temp in degrees C to 2 decimal places Sign = Water_Temp.15 Water_Temp = ((ABS(Water_Temp) >> 1) * 100) if Sign then Water_Temp = -Water_Temp Water_Temp = Water_Temp - 25 _ + (((count_per_c - count_remain) * 100) / count_per_c) IF Temp_Displayed = Celsius then RETURN 'IF the Temp_Displayed = Fahrenheit then Convert C to F before returning Sign = Water_Temp.15 Water_Temp = (ABS(Water_Temp) */ 461) if Sign then Water_Temp = -Water_Temp Water_Temp = Water_Temp + 3200 RETURNYou don't need the Temp_Convert include file.Code:Print_To_2nd_Line_Of_Lcd: LCDOut $fe, $c0 IF Its = Dark THEN LCDOUT 1 else LCDOUT 2 endif LCDOut "H2o = " if Water_Temp.15 then LCDOut "-" Water_Temp = ABS(Water_Temp) LCDOut DEC Water_Temp / 100,".",DEC2 Water_Temp,0 IF Temp_Displayed = Fahrenheit then LCDOut "F " else lcdout "C " endif IF Its <> Dark THEN lcdout DEC Lite_Level endif RETURN
HTH,




Bookmarks