Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

DS18s20 data line reset

Status
Not open for further replies.
I'm stumped on why my Dallas one wire temp sensor (ds18s20) is starting out in a crazy number state on power up. When the data line is disconnected, and a 0 C value is read, then reconnected all is well. The proper readings will survive a MCLR, but go back to crazy reading with a power off and on.

Any ideas? Supposedly there was a problem with a certain die lot. Have tried another sensor with a newer die lot and same problem.
 
It should always have an initial temperature reading of 85 degrees C after power-on (see data sheet).

The solution is to do a dummy initial reading sequence after power-on, ignore it, then it will start showing the actual temperature for the next read sequences.
 
Crazy value as in at 15C the returned value is 11,791. The value will increase or decrease by the least significant bit(s) as expected, so there is life going on, just some misinterpretation. Suspect its a hardware problem. Put a NC button on the data line till some point on down the road, as I will not be able to fix or respond after tommorrow.

Understand about the 85C startup, but since readings are going on every five seconds or so it would be tossed out anyway.

Tried a longer reset periord, double reset, 4k7 and 2k2 pullups. Breadboard with hookupwire wire to cat5e and pcb. The code has always worked before, and does so after the data line on, off, on routine mentioned before.

Now I admit to a real bonehead move, when soldering the temp sensor to the pcb, I forgot to de-energize the power supply :eek: Thought I killed a pin, so changed to a new port and pin with the same effect. Other functions including I2C and A2D still work properly, so the Pic seems o.k. Don't have another 18f 40 pin to try, so can't test that theory.

Its still a mystery.
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top