What happens when you remove the while Oread line? The cocaCola Kid doesn't use that, he just does straight writes to it, and then reads it (in post #17) and it seems to work for him.
Code:
ReadDS18B20:
owout DSDataPin,1,[$CC,$44] ; Tell sensor to start a temperature conversion
owout DSDataPin,1,[$CC,$BE] ; Tell sensor you want to read the temperature
owin DSDataPin,0,[STR DQ\9] ; Receive temperature from the sensor
RawTemp.Byte0 = DQ[0] ; Extract the temperature portion and put it in its one word variable
RawTemp.Byte1 = DQ[1]
gosub GetCRC ; Calculate the CRC for comparison
gosub ConvertCelcius ; Convert temperature to ºC
gosub ConvertToFahrenheit ; Convert temperature to ºF
gosub ConvertToKelvin ; Convert temperature to K
return
Bookmarks