DS18B20 VS DS18S20 & multiple


Closed Thread
Results 1 to 7 of 7

Hybrid View

  1. #1
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    ... can you point me out how to read 2 sensors on 1 bus ...
    Well, my first instinct is to say "Don't Do It".

    The overhead involved, is HUGE.
    You'll end up using 2-3K words of program space just doing the SearchRom, saving the serial number to RAM/EEPROM, then sending those serial numbers each and every time you access either one of the sensors.

    It's so much easier to just use another pin.
    And with separate pins, the program automatically knows which sensor it's talking too.
    With multiple devices on a single buss, there's no easy way to tell which sensor is in which location (without human intervention).

    But with that said, if you only have the one pin available?
    Here's where you need to start ...

    1 Wire Search Routine (Dave)
    http://www.picbasic.co.uk/forum/showthread.php?t=520

    Dallas 1-wire search Routine (jimbab)
    http://www.picbasic.co.uk/forum/showthread.php?t=3671
    Last edited by Darrel Taylor; - 5th February 2008 at 23:06. Reason: multi sensors need sensor setup function
    DT

  2. #2


    Did you find this post helpful? Yes | No

    Default

    Thanks Darrel

    Well I only have 1 pin free but will use only 1 sensor then

    As i'm polling with HSER several AD value's and I/O if was wondering to speed up the
    polling if it should not be possible to exit the loop when count_remain is not finished yet
    and send meanwhile the previous temperature value as reply to the serial poll for temperature

    once count_remain is 0 then update the temp value

    should this be done by an interupt routing when count remain = 0 ?

Similar Threads

  1. Please help with code for DS18B20
    By fratello in forum mel PIC BASIC Pro
    Replies: 109
    Last Post: - 28th April 2013, 21:12
  2. Help with DS18B20 program
    By presario1425 in forum mel PIC BASIC Pro
    Replies: 38
    Last Post: - 22nd August 2012, 00:50
  3. Multiple PICS from Same Crystal?
    By WOZZY-2010 in forum General
    Replies: 2
    Last Post: - 6th February 2010, 15:18
  4. DS18B20 and 3310
    By d_a_l_3 in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 4th February 2008, 08:57
  5. 16F877, DS18S20 and Serial Comm Problem
    By YellowTang in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 26th April 2004, 10:36

Members who have read this thread : 0

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