Adapt MELABS DS18B20 example to show negative temperatures?


Closed Thread
Results 1 to 6 of 6

Hybrid View

  1. #1
    Join Date
    May 2013
    Location
    australia
    Posts
    2,670


    Did you find this post helpful? Yes | No

    Default Re: Adapt MELABS DS18B20 example to show negative temperatures?

    What should be fixed there to display negative temperature properly?
    As I've read DS18B20 datasheet, negative temperature output will always have 4 MSB bits set to 1111. But what's wrong with the above conversion formula?
    you may have read the DS18B20 datasheet but you are using code for a DS18S20 so the first step is work out what you really have and then use the correct method
    Warning I'm not a teacher

  2. #2
    Join Date
    Feb 2013
    Posts
    1,150


    Did you find this post helpful? Yes | No

    Default Re: Adapt MELABS DS18B20 example to show negative temperatures?

    Well I have it running with DS18B20 and it displays positive temperatures just fine...

  3. #3
    Join Date
    Feb 2013
    Posts
    1,150


    Did you find this post helpful? Yes | No

    Default Re: Adapt MELABS DS18B20 example to show negative temperatures?

    I also used this:

    https://melabs.com/samples/LABX1-16F...emp_DS1822.htm

    But it is much slower.
    And I don't need high precision, this is just room temperature thermometer, 1C precision is ok.

Similar Threads

  1. Why does PICkit2 show it as an LF device?
    By Balachandar in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 21st October 2018, 15:28
  2. Best way to read multiple temperatures?
    By jmgelba in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 29th May 2012, 21:07
  3. How to compare two temperatures
    By SKOLS1 in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 10th April 2012, 09:07
  4. How do I compare two temperatures
    By critix in forum Code Examples
    Replies: 4
    Last Post: - 4th January 2011, 12:42
  5. DS18S20 displays wrong temperatures
    By Shozo Kanamori in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 6th August 2007, 03:18

Members who have read this thread : 3

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