The ReadTemp and ReadTemp12 commands were specifically developed for the DS18B20.
But, if you do have the older format (DS18S20 - marked as DS1820 on the device) all is not lost. You can get 0.5 degrees C resolution.
The following was posted on the Yahoo PICAXE groups as message #2441
**************************
' For DS18S20, P H Anderson, Dec 26, '05
Symbol TReading = W0
Symbol Whole = B2
Symbol Fract = B3
Symbol SignBit = B4
Symbol Dig = B5
Symbol TempC_10 = W4
Top:
ReadTemp12 6,TReading
SignBit = TReading / 256 / 128
If SignBit = 0 Then Positive
' its negative
TReading = TReading ^ $ffff + 1
Positive:
TempC_10 = TReading * 5 ' TC = value * 0.5
GoSub DisplayTemp
Wait 1
GoTo Top
DisplayTemp:
Whole = TempC_10 / 10
Fract = TempC_10 % 10
If SignBit = 0 Then DisplayTemp_1
SerTxD ("-")
DisplayTemp_1:
SerTxD (#Whole, ".")
' be sure the fractional is two digits
Dig = Fract / 10
SerTxD (#Dig)
Dig = Fract % 10
SerTxD (#Dig, 13, 10)
Return
***************
Peter Anderson,
http://www.phanderson.com