18F4420 and 1-Wire


Closed Thread
Results 1 to 13 of 13

Hybrid View

  1. #1
    Join Date
    Apr 2011
    Location
    Welches, Oregon
    Posts
    198


    Did you find this post helpful? Yes | No

    Default Re: 18F4420 and 1-Wire

    Yes, of course.

    I forgot the pull-up resistor (4K7) when designing the board. I had intended to add it at the "plug" end of the cable, then forgot that as well; without this pull-up the "Waitloop" never exits. Once the hardware was correct, the temperature readings were suspiciously low (I suspect for the reasons Alain suggests). "Room temperature" reading was 62F, but my analog thermometer read closer to 70F; placing the sensor under my arm should have demonstrated somewhere near 98F, but the measured value was only 85F. Bruce's (Reynold's Electronics) conversion routine gives more accurate results:

    Dummy = Raw_Temperature * 1125
    Raw_Temperature = DIV32 100
    Raw_Temperature = Raw_Temperature +3200
    Temp_in_F = Raw_Temperature

    While I cannot verify that this formula yields precise results, room temperature reading of 69.14 was much closer to thermometer reading 0f 70; and under arm reading rose to 97+.
    Last edited by Amoque; - 22nd March 2015 at 12:50.

  2. #2
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default Re: 18F4420 and 1-Wire

    4K7 seems to be a bit on the high side, I have always used 2k2 for my pullups. Maybe a reason?
    Dave Purola,
    N8NTA
    EN82fn

  3. #3
    Join Date
    Apr 2011
    Location
    Welches, Oregon
    Posts
    198


    Did you find this post helpful? Yes | No

    Default Re: 18F4420 and 1-Wire

    The datasheet calls for a "strong" pull-up and recommends 4K7; I searched the internet and saw others having success with this value. I have no knowledge or experience that suggests a better value, so I tried it and it seems to work well.

  4. #4
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Default Re: 18F4420 and 1-Wire

    Quote Originally Posted by Dave View Post
    4K7 seems to be a bit on the high side, I have always used 2k2 for my pullups. Maybe a reason?
    a very good reason is the cable length between the probe and the PCB ....

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  5. #5
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,159


    Did you find this post helpful? Yes | No

    Default Re: 18F4420 and 1-Wire

    I haven't tested with long wires yet:
    http://www.picbasic.co.uk/forum/showthread.php?t=17282
    but 4K7 worked at 115,200 at 64MHz in preliminary tests.

    (Diagram in post #1 is not updated, only 2 resistors used)

    Robert

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


    Did you find this post helpful? Yes | No

    Default Re: 18F4420 and 1-Wire

    115,200.... What?
    Dave Purola,
    N8NTA
    EN82fn

  7. #7
    Join Date
    Dec 2010
    Posts
    409


    Did you find this post helpful? Yes | No

    Default Re: 18F4420 and 1-Wire

    Actually the main reason for lower value resistors is when there are several devices on the bus. If you are just using one device, 4.7 K is fine and wastes less current.
    Robert, you must have posted on the wrong thread? No RS-232 in this discussion...

  8. #8
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,159


    Did you find this post helpful? Yes | No

    Default Re: 18F4420 and 1-Wire

    Quote Originally Posted by Dave View Post
    115,200.... What?
    Oops. Overly medicated apparently. LOL

Similar Threads

  1. Migrating to 18F4420
    By Amoque in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 20th February 2015, 14:58
  2. Please help with 1-wire DS1820
    By hatuan291 in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 9th March 2010, 13:51
  3. one wire
    By karenhornby in forum General
    Replies: 7
    Last Post: - 18th June 2008, 20:24
  4. 1-Wire
    By WarPony in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 11th May 2008, 22:14
  5. 1-wire emulator
    By johnyman34 in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 10th March 2006, 12:17

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