Did you know that... Dallas 1-Wire search trick/work around


Closed Thread
Results 1 to 1 of 1
  1. #1
    Join Date
    Oct 2009
    Location
    Utah, USA
    Posts
    427

    Default Did you know that... Dallas 1-Wire search trick/work around

    Hey group,

    Just thought I'd relate my findings with respect to the 1-wire protocol.

    I have a project that uses two 1-wire devices. A DS18b20 temperature sensor and a DS2417 Real Time Clock. I needed both devices to share the same PIC pin.

    So I spent much time working on the 1-wire discovery code that I found here... http://www.picbasic.co.uk/forum/showthread.php?t=3671
    which actually works quite well (thanks jimbab!!)

    Then after studying the different command sets for each device I realized that there was no overlap between them.

    So I have tested and verified that I can still use the $CC (skip ROM) command and talk to each sensor as though it was the only one on the line because the Function command sets for each device don't overlap..

    I have been able to read and write to both sensors on the same line, no problems (so far).

    I was planning on using the search routine so that I could swap out 1-wire devices and have the code learn the address of the new device without my intervention. But now I don't need to.

    Now keep in mind this only applies if the two (or more??) devices don't share any function commands.

    I had even called Dallas/Maxim to inquire if there was a way to just specify the family code to access each device without having to include the full 64 bit ROM code. The engineer told me I would have to include the full address.

    This simplifies my code quite a bit. Sweet!
    Last edited by Heckler; - 16th February 2015 at 17:41.
    Dwight
    These PIC's are like intricate puzzles just waiting for one to discover their secrets and MASTER their capabilities.

Similar Threads

  1. 1 Wire Search Routine
    By Dave in forum Code Examples
    Replies: 3
    Last Post: - 4th March 2016, 07:39
  2. Dallas one-wire question
    By Travin77 in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 7th May 2006, 17:32
  3. Dallas 1-wire search Routine
    By jimbab in forum Code Examples
    Replies: 0
    Last Post: - 7th April 2006, 16:14
  4. Interfacing with Dallas 1-Wire weather station
    By bcd in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 1st January 2006, 11:44
  5. Dallas 1-Wire CRC Calculation
    By CocaColaKid in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 15th August 2005, 09:43

Members who have read this thread : 2

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts