LCDOUT with a LONG Variable


Closed Thread
Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2014
    Posts
    16

    Default LCDOUT with a LONG Variable

    Hello is there a way to use LCDOUT with a long variable?

    DEFINE X VAR LONG

    LCDOUT $FE, LINE1, #X

    It appears to always convert the variable to a WORD then outputs it

  2. #2
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,521


    Did you find this post helpful? Yes | No

    Default Re: LCDOUT with a LONG Variable

    Hi,
    Your variable declaration is wrong and it seems as if the # operator doesn't support LONGs, use DEC instead
    Code:
    X VAR LONG
    X = 1234567
    LCDOUT $FE, 1, DEC X
    /Henrik.

  3. #3
    Join Date
    Mar 2014
    Location
    England
    Posts
    16


    Did you find this post helpful? Yes | No

    Default Re: LCDOUT with a LONG Variable

    Hi,
    I think that SDEC instead of DEC will solve your problem!

  4. #4
    Join Date
    Nov 2014
    Posts
    16


    Did you find this post helpful? Yes | No

    Default Re: LCDOUT with a LONG Variable

    Thank you, SDEC works!

  5. #5
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,614


    Did you find this post helpful? Yes | No

    Default Re: LCDOUT with a LONG Variable

    Thanks for the tip ...
    Last edited by Acetronics2; - 16th January 2015 at 16:37.
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

Similar Threads

  1. Replies: 1
    Last Post: - 28th April 2011, 18:02
  2. Unable to pass a variable to LCDOUT without getting compile errors
    By Ferroto Baggins in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 28th February 2010, 16:43
  3. How long a variable has the same value?
    By DanPBP in forum General
    Replies: 2
    Last Post: - 22nd February 2008, 23:54
  4. signed long (32-bit) variable
    By Stephan in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 11th September 2007, 03:40
  5. 8bit LCDout vs 4bit LCDout
    By keithdoxey in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 24th May 2006, 12:16

Members who have read this thread : 1

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