Temperature Problem

D396

Senior Member
I have a DS18B20 hooked up to a 28x1 on the one wire bus and I get a zero reading every time
here is the basic code :
main:
readtemp 7,w1
if w1 < 127 then ' test for positive temperature reading
sertxd("-",#w1)
else ' else temperature reading is negative
sertxd(#w1)
endif


wait 1
goto main
Thanks for any help you can give
here is a picture of the breadboard:
 

Attachments

Last edited:

eclectic

Moderator
D396

I'm sorry, but I find the circuit/photo a little confusing.

What happens when you connect the circuit
exactly as shown in Manual 2, page 154,
and use the program from the same page?

The DS18B20 normally works perfectly.

e

PS
It is much easier if you can use the
Manage Attachments
option
then Attach JPG files

from the Reply page.

Edit
Cross posts. I was replying to the original question
 
Last edited:

Technical

Technical Support
Staff member
You have the V+ and 0V on the sensor the wrong way around (unfortunately this may have killed it....but you might be lucky)
 

Technical

Technical Support
Staff member
Or you read it backwards! Sometimes it is hard with original manufacturers datasheets to know if they are drawn 'from above' or 'from below' . The diagram under 'readtemp' in part 2 of the PICAXE manual should be clearer for you.
 
Top