Ds1820


Closed Thread
Results 1 to 6 of 6

Thread: Ds1820

Hybrid View

  1. #1
    puru's Avatar
    puru Guest


    Did you find this post helpful? Yes | No

    Default

    Thanks for you reply but now I realize my post is not clear. The last line of the program I posted is not for the remote display. I do use serout but I'm not able to send temperature, that is a word, divided in multiple one byte. Before each one of these bytes I have also to send the row and location byte.

  2. #2
    puru's Avatar
    puru Guest


    Did you find this post helpful? Yes | No

    Default

    For example if the temperature is 15.78 I have to send: row, location, 1 after that row, location, 5 and so on.

  3. #3
    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 ...
    _______________________________________________



  4. #4
    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, 13:51
  2. DS1820 display with 7-seg 4 digits
    By chai98a in forum Code Examples
    Replies: 12
    Last Post: - 10th April 2008, 13:12
  3. DS1820 and 18f2550
    By rjones2102 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 2nd October 2007, 18:11
  4. PIC lcd ds1820
    By wchpikus in forum mel PIC BASIC
    Replies: 2
    Last Post: - 24th May 2007, 14:46
  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