Can we have multiple 1-wire devices on single pin?


+ Reply to Thread
Results 1 to 19 of 19

Hybrid View

  1. #1
    Join Date
    Feb 2013
    Posts
    604

    Default Can we have multiple 1-wire devices on single pin?

    Arduino supports that, but I have not found anything about for that in PBP reference manual...
    I want to hook up 4 pcs of DS18B20 to single pin. As I have read, each has unique identifier, so it should be possible, but how?

  2. #2

    Default Re: Can we have multiple 1-wire devices on single pin?

    It is quite doable, you just need to write your own code. Do a search of the forum - I know there is a code example because I've used it 8-9 years ago. There are no native commands in any language I'm aware of. This is not PBP vs C or PIC vs Arduino.

  3. #3
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,164

    Default Re: Can we have multiple 1-wire devices on single pin?

    Here is a program I wrote some years ago to do a search of 1 wire devices present on a single bus.
    Attached Files Attached Files
    Dave Purola,
    N8NTA
    EN82fn

  4. #4

    Default Re: Can we have multiple 1-wire devices on single pin?

    I've never understood the logic behind the find all the serial numbers function, unless you know what each device (using it's serial number) is measuring it seems pointless. For example in s asystem with three devices, one measuring ambient, one measuring input temp and another measuring output temp - how does it help to be able to determine the serial numbers of the devices when you don't know which ones which?
    George

  5. #5
    Join Date
    Sep 2009
    Posts
    686

    Default Re: Can we have multiple 1-wire devices on single pin?

    You just add one device at time. And search after you add one.

  6. #6
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,164

    Default Re: Can we have multiple 1-wire devices on single pin?

    Exactly correct. What I do is scan each sensor 1 at a time and take the serial number and attach it to the sensor lead with a piece of paper under a piece of transparent film. That way I can replace any sensor in my system with another one and just change the serial number in the code.
    Dave Purola,
    N8NTA
    EN82fn

  7. #7

    Default Re: Can we have multiple 1-wire devices on single pin?

    True, but isn't it easier to know which serial as you install each device.
    George

Similar Threads

  1. Random outcome on multiple devices
    By Aussie Barry in forum mel PIC BASIC Pro
    Replies: 22
    Last Post: - 22nd October 2013, 23:36
  2. Multiple I2c Devices
    By alphaengr in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 12th January 2012, 05:37
  3. Multiple serial devices to one pic
    By rshaver in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 16th October 2011, 16:34
  4. Need Single wire serial LCD converter example
    By polymer52 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 16th December 2009, 03:30
  5. Multiple RETURNS within a single subroutine
    By BrianT in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 21st June 2009, 17:43

Posting Permissions

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