DS18S20 displays wrong temperatures


Closed Thread
Results 1 to 8 of 8

Hybrid View

  1. #1


    Did you find this post helpful? Yes | No

    Smile Found my mistake

    My temperature sensor provided by Maxim was actually DS18B20 instead of DS18S20. I found this by carefully observing the sensor's surface with a magnifying glass. I never had doubts about this. The resemblance between "B" and "S" made me spend many hours of frustrating time. Sorry for the viewers.

    Shozo Kanamori
    It's not easy for hobbyists to get DS18S20 here in Tokyo.

  2. #2
    Join Date
    Sep 2005
    Location
    Switzerland
    Posts
    46


    Did you find this post helpful? Yes | No

    Default

    Shozo,
    here I found a well done prg. for 18B20 that maybe can help you.
    http://www.rentron.com/PicBasic/one-wire3.htm

    bye

  3. #3


    Did you find this post helpful? Yes | No

    Smile Program for DS18B20 looks good!

    Hi Lotondo,

    The article you introduced me seems to be very helpful. I have browsed a lot of webpages but never come across this article before. I will soon start my experiment using DS18B20.

    Thank you.

    Shozo Kanamori

  4. #4
    Join Date
    Sep 2005
    Location
    Switzerland
    Posts
    46


    Did you find this post helpful? Yes | No

    Default

    Nice to read that my link maybe helpful.
    By the way, I have trouble using ds18S20 with temperature below 0° celsius
    if you see some code regarding how to use it, pls link it to me.
    Thanks
    Bye

  5. #5
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    Darell Taylor has some very nice temp conversion routines here http://www.pbpgroup.com/ you might also find very useful.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

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


    Did you find this post helpful? Yes | No

    Default

    Thanks Bruce!

    I was talking with someone else off forum that had problems using the conversion routines with a DS1820 and negative temperatures, so I came up with this.
    Code:
    Sign  VAR  BIT
    TempC VAR  WORD
    
    Sign = temperature.15
    TempC = ABS(temperature)
    TempC =(TempC>>1)*10 + (TempC.0 * 5)
    IF Sign then TempC = 0 - TempC
    He said it worked, but I haven't tried it myself.

    HTH,
      Darrel
    Last edited by Darrel Taylor; - 10th May 2006 at 23:30. Reason: Changed Variable snafu

Similar Threads

  1. 7 Segment Displays and MAX7219
    By Bill Legge in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 31st October 2010, 19:30
  2. DS18S20 reading negative temperature
    By srob in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 28th December 2007, 22:21
  3. ADCIN - AD settings are wrong
    By teverett in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 4th December 2006, 17:32
  4. Using DS18S20 vs DS1820 with 4x7 LED Displays
    By sayzer in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 16th October 2006, 05:36
  5. 16F877, DS18S20 and Serial Comm Problem
    By YellowTang in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 26th April 2004, 11: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