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.

ds18b20 not working

Status
Not open for further replies.
Hi al,

For the past 2 days i am trying to read the value from temperature sensor ds18b20.But i didnt get the any values.i have few doubts.Actually i am connecting ds18b20 with renesas controller(r8/tiny series).

Normally in renesas controller if a pin is made as input.we need to enable pullups.
My doubt is..
In the sensor pdf, they have mentioned to connect pullup for DQ pin(data pin).So i connected 4.7k to VCC.But is it necessary to use both the pullups(internal pullup of controller+DQ pin pullup)?

Also in sensor pdf they mentioned about time delays for reading the values as well as writing the values..I am not giving delays less than what they have mentioned.But i have given delay more than that..Suppose if they have mentioned to give 1usec delay, i had given 10 usecs.Will it cause any problem?
 
The 10 µs delay will not matter if it is between pulses. There is no upper limit for times between pulses.

The short pulses have to be between 1 µs and 15 µs

The internal pull-up inside the controller will probably provide too little current. If you do not provide enough pull-up current, the data line will not rise quickly enough at the end of each pulse. I would have the 4.7 kΩ pull up until you get it working. Then disconnect it. If you can still read the temperature, that's great. If not, put the resistor back on.

Reading temperature from a DS18B20 is a complicated procedure. If you haven't got an oscilloscope to make sure that your controller is doing the right thing, it makes things really difficult.

I would suggest you try to read the ROM on the DS182B20 first. That is easier, and you can be sure that it works by trying a different DS18B20 as each one has a different ROM value.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top