I have the DS18B20 connected to my pic on portB. Everything checks out electrically. However I always get a reading of 74F even when I throw the PIC into the fridge.

I have weak pullups enabled on portB and am not using parasite power. (I tried a 4.7K resistor already)

Thoughts???

The Code:

Show_Temp:
OWOut PORTB.6,1,[$CC,$44] ' Skip ROM search & do temp conversion

Wait_Temp:
OWIn PORTB.6,4,[Stat] ' Read busy-bit
IF Stat=0 Then Wait_Temp

OWOut PORTB.6,1,[$CC,$BE] ' Skip ROM search & read scratchpad memory
OWIn PORTB.6,2,[temperature.Lowbyte,temperature.Highbyte]' Read two bytes / end comms

temperature=((((temperature>>4)+50)*9)/5)-58

value = temperature/100
LCDOut $FE,LCDLine1+7,dec value,Deg,"F"
Return