Ds1820


Closed Thread
Results 1 to 6 of 6

Thread: Ds1820

Hybrid View

  1. #1
    Join Date
    Feb 2004
    Location
    Germany
    Posts
    762


    Did you find this post helpful? Yes | No

    Default

    Assuming temperature is a word size variable and holds a value of 1578 (for 15.78 deg C)

    Use SEROUT2 with the DEC modifier. (See Manual Section 5.71)
    (SEROUT doesn't support modifiers)

    Also have a look at Manual Section 4.17.7
    DIG will solve your problem

    Code:
    SEROUT2,Pin,Mode,[DEC1 temperature DIG 3,DEC1 temperature DIG 2,".",DEC1 temperature DIG 1,DEC1 temperature DIG 0," °C"]
    You will have to add the control-codes for your LCD to the code-example
    regards

    Ralph

    _______________________________________________
    There are only 10 types of people:
    Those who understand binary, and those who don't ...
    _______________________________________________



  2. #2
    puru's Avatar
    puru Guest


    Did you find this post helpful? Yes | No

    Smile

    Thank you very much Ralph for your solution. Despite all manuals, just now I can see a way to access the innard of temperature variable.
    Bert

Similar Threads

  1. Please help with 1-wire DS1820
    By hatuan291 in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 9th March 2010, 14:51
  2. DS1820 display with 7-seg 4 digits
    By chai98a in forum Code Examples
    Replies: 12
    Last Post: - 10th April 2008, 14:12
  3. DS1820 and 18f2550
    By rjones2102 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 2nd October 2007, 19:11
  4. PIC lcd ds1820
    By wchpikus in forum mel PIC BASIC
    Replies: 2
    Last Post: - 24th May 2007, 15:46
  5. DS1820 again
    By paxmowa in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 10th January 2006, 15: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