OWOut DQ, 1, [$CC, $BE]' Read the temperature
OWIn DQ, 0, [temperature.LOWBYTE, temperature.HIGHBYTE, skip 4 , count_remain, count_per_c]
' Calculate temperature in degrees C to 2 decimal places (not valid for negative temperature)
temperature = (((temperature >> 1) * 100) - 25) + (((count_per_c-count_remain) * 100) / count_per_c)
LCDOut $fe, 1, DEC (temperature / 100), ".", DEC2 temperature, " C"
' Calculate temperature in degrees F to 2 decimal places (not valid for negative temperature)
'temperature = (temperature */ 461) + 3200
'LCDOut $fe, $c0, DEC (temperature / 100), ".", DEC2 temperature, " F"
Pause 2000 ' Display about once a second
looking at the code it is fine
therefore it must be something in your equassion that works out the tempreture display
i notice you have an issue within the above code i pasted
youll see that the tempreture is worked from the last event of tempreture
instead of using two variables array {1st part of array is deg c second deg f}
so the original value for deg f will be dirived from your calculation of degc and not what was read from the chip maybe this is where its going wrong
1 deg c = 33.8 F
therefore 7.89 is a strange number to get back
sounds like its in your equassion somehwhere
http://www.rentron.com/PICX4.htm here is a project i found on rentons site
its in basic so i think will be good to study it