Fahrenheit with DS1820


Closed Thread
Results 1 to 2 of 2
  1. #1
    Pedro Pinto's Avatar
    Pedro Pinto Guest

    Default Fahrenheit with DS1820

    Hello
    I use the sample from Ressource for temperatur meassure with DS1820 and it works. Now i need to show not in celsius but in Fahrenheit. Have anyone a idea how to do that?

    Thanks

    Best regards
    Pedro

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


    Did you find this post helpful? Yes | No

    Default

    Here's one way ...
    Code:
        Sign = TempC.15                ; convert to Fahrenheit
        TempF = ABS(TempC) */ 461
        if Sign then TempF = -TempF
        TempF = TempF + 32
    
        ; TempF is a signed word
    DT

Similar Threads

  1. DS1820 with 16f688
    By jessey in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 23rd May 2009, 05:07
  2. DS1820 display with 7-seg 4 digits
    By chai98a in forum Code Examples
    Replies: 12
    Last Post: - 10th April 2008, 13:12
  3. PIC lcd ds1820
    By wchpikus in forum mel PIC BASIC
    Replies: 2
    Last Post: - 24th May 2007, 14:46
  4. Returning whole numbers for DS1820?
    By jessey in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 12th February 2007, 12:15
  5. DS1820 again
    By paxmowa in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 10th January 2006, 14:49

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