Dallas/Maxim one wire initialization

All things pertaining to wireless and RF links

Moderator: phalanx

Post Reply
Posts: 3
Joined: Wed Jul 19, 2017 1:32 am

Dallas/Maxim one wire initialization

Post by mozobata » Wed Jul 19, 2017 1:35 am

I am using a Dallas DS18B20(here is the ds18b20 of datesheet)
thermometer that communicates with Maxim's one wire protocol. I'm having issues at the initialization sequence. I have pulled the line high for 500 uSeconds, pulled the line low for 510 uSeconds (the reset), pulled high for 45 uSeconds, waited for 120 uSeconds for the thermometer to pull the line low as a response (the presence pulse), and then sampled the signal to make sure it was low. If it is not low, something went wrong. When I look at the signal in my 'scope, I see it get pulled down for 510 uSeconds and the pulled up for 680 uSeconds. This means the thermometer did not respond at all (45 + 120 + 500 = 675 uSeconds). What am I doing wrong?

User avatar
Posts: 396
Joined: Sat Apr 25, 2015 9:29 am

Re: Dallas/Maxim one wire initialization

Post by DanV » Wed Jul 19, 2017 6:59 am

I have no experience using this device.
However, reading the datasheet you linked to reveals that I think you may be not performing the initialization properly:
During the initialization sequence the bus master transmits (TX) the reset pulse by pulling the 1-Wire bus low for a minimum of 480μs. The bus master then releases the bus and goes into receive mode (RX). When the bus is released, the 5kΩ pullup resistor pulls the 1-Wire bus high. When the DS18B20 detects this rising edge, it waits 15μs to 60μs and then transmits a presence pulse by pulling the 1-Wire bus low for 60μs to 240μs.
Are you using a 5K pullup resistor? The datasheet basically says you must.

You must also connect Vdd to something - if parasitic powered, connect it to GND; if not, connect it to an external source.

Post Reply