I have purchased 2 x DS18B20 temperature sensors hoping to connect it up with a 28xI. I have followed the wiring diagram provided in the basic command manual. I have tried the two following programs;
PROGRAM 1
main:
readadc 0,b1
pause 1000
debug
goto main
When using this program I get a value of 254 in b1 that is constantly displayed no matter what the temperature is. The sensor is receiving 5V and I am using a voltage regulator 7805. The data line is reading 4.98V constantly. The 4K7 resistor is in place between the data and positive line.
PROGRAM 2
main:
readtemp 0,b1
pause 1000
debug
goto main
When I use this program everything is the same apart from I get a value of 0 in all b variables.
I feared my soldering iron may have been too hot for the sensor, therefore I used a connector block to connect up a new unused sensor however I experience the same results. I have also tried it without connecting the positive to the sensor as on the datasheet it states it is not necessary, but still no joy. I tried to put some Pics up but my putfile isn’t working at the mo so will do as soon as I can. Any help would be much appreciated as I have nearly spent an entire day scratching my head.
PROGRAM 1
main:
readadc 0,b1
pause 1000
debug
goto main
When using this program I get a value of 254 in b1 that is constantly displayed no matter what the temperature is. The sensor is receiving 5V and I am using a voltage regulator 7805. The data line is reading 4.98V constantly. The 4K7 resistor is in place between the data and positive line.
PROGRAM 2
main:
readtemp 0,b1
pause 1000
debug
goto main
When I use this program everything is the same apart from I get a value of 0 in all b variables.
I feared my soldering iron may have been too hot for the sensor, therefore I used a connector block to connect up a new unused sensor however I experience the same results. I have also tried it without connecting the positive to the sensor as on the datasheet it states it is not necessary, but still no joy. I tried to put some Pics up but my putfile isn’t working at the mo so will do as soon as I can. Any help would be much appreciated as I have nearly spent an entire day scratching my head.