DS1820 Negative Numbers and OffSet


Closed Thread
Results 1 to 6 of 6

Hybrid View

  1. #1
    Join Date
    May 2008
    Location
    Italy
    Posts
    825


    Did you find this post helpful? Yes | No

    Default Re: DS1820 Negative Numbers and OffSet

    Why don't you use two different offsets? If you use N_OffSet for the negative number and P_OffSet for the positive number the operation will be:

    LCD_Temperature = Sensor_Temperature + P_OffSet - N_OffSet

    You have simply to set to zero the value not used.


    Cheers

    Al.
    Last edited by aratti; - 23rd April 2011 at 21:07.
    All progress began with an idea

  2. #2
    Join Date
    Aug 2008
    Location
    Portugal
    Posts
    240


    Did you find this post helpful? Yes | No

    Default Re: DS1820 Negative Numbers and OffSet

    Quote Originally Posted by aratti View Post
    Why don't you use two different offsets? If you use N_OffSet for the negative number and P_OffSet for the positive number the operation will be:

    LCD_Temperature = Sensor_Temperature + P_OffSet - N_OffSet

    You have simply to set to zero the value not used.


    Cheers

    Al.

    I Al,

    It's a good idea, but i allready resolved the problem just with one variable, and it works like a charm. You can see my solution in the second post of this thread.

    Thanks.
    Thanks and Regards;
    Gadelhas

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