1wire - same signals no replys

Go To Last Post
4 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hey guys;

I just got my OLS (open source logic sniffer) and decided to put it to the test to figure out why my 1wire source that used to work isnt working anymore. So I first hooked the OLS up to my Bus Pirate and communicated with a DS18B20 temp sensor and caught the whole transaction on the OLS. So then I moved the temp sensor and OLS to my AVR and ran the same command...

What I am seeing is really bugging me. I tweaked my code to be almost identical to the bus pirates and for some reason my temp sensor doesnt talk back, any of them. back on the bus pirate they work fine...

here is the OLS output; guess whos is whos?

... mine is on top; the bus pirates is in bottom. As you can see the bus pirate has data comming back after the 11001100 (0x33). (first is the presence, which mine shows ok because the line gets pulled back down),,

Any ideas?

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Some more to note.

My 1wire circuit should be good. 5v with 4.7k (yellow-purp-red-gold) pullup; not in parasite power, nor was the Bus Pirate tests. The bus pirate was not on ciicuit; it was by itself using 5v on BS18B20 and the VPU line, also not in parasite mode.

and my source goes back to DDR-0 PORT-0 after sending the command, the pullup pulls the line back up of course. so its not my code keeping the line up, i dont think...

Btw. im not affiliated with DP but anyone looking for a cheap but awesome logic analyzer should check out the OLS, under 40 with 200Mhz sampling rate; 32 channels 16 buffered as-is (can buy a 'wing' that buffers the other 16). Also the bus pirate is pretty sweet (same people -around 30$).

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

first guess is that your code is always running the I/O pin in output mode, thus the remote device is unable to pull the line low at the appropriate time. But to be truly helpful, we need to see your code, not just a waveform capture.

[edit]you posted as I was posting. You don't just sent the command, you have to continue to send pulses to clock the data. It is VERY IMPORTANT that you only ever pull the line low, and never drive it high. (unless you are over-driving, but this can only be done at specific times)

Writing code is like having sex.... make one little mistake, and you're supporting it for life.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

omy glitch you handsome devil!

I was so caught up in my new logic toy I forgot all about the 1us pulses! that was exactly it. I was sending the command then releasing the bus without doing anything else.

data is coming in clean now!

Thanks a ton glitch.