Hi there,
Which Dallas 1 wire sensor are you using ? The DS18x20 type or iButton types.
Also do you plan on having more than one on the 1 wire bus ?
If there is only one device on the bus you so not need the devices ROM code but can use the "Skip ROM"(CCh) command instead of "Match ROM"(55h). If there is more than one device on the bus you will have to do a full search ROM routine to get the ROM code of the device you want to use.
There is also the question of "strong pull-up" if the device is a DS18x20 type if in parasite power mode or a DS1920 iButton type which is always in parasite mode. In parasite mode you have to pull the bus up to 5 volts during the time the conversion takes place. I use a P-channel MOSFET controled by one of the PortB outputs to do the strong pull-up. The strong pull-up routine is time based since no information can be taken from the bus when it is turned on.
There is also a difference between the DS18B20 and DS18S20 as to the resolution. The DS18S20 is 9 bit resolution while the DS18B20 can be set from 9 to 12 bit resolution. The DS18B20 comes on with the default valuse set to 12 bit resolution.
From the value of "32.32F" it sounds like the device is not answering at all and the "Temp" is just returning all 0.
Let me know just what your configuration is.
Jim
Bookmarks