A strange problem


Closed Thread
Results 1 to 12 of 12

Hybrid View

  1. #1
    Join Date
    Dec 2011
    Location
    IO93ok
    Posts
    190


    Did you find this post helpful? Yes | No

    Default Re: A strange problem

    Maybe try

    LCDOUT $FE, $80, DEC2 A

  2. #2
    Join Date
    Dec 2011
    Location
    IO93ok
    Posts
    190


    Did you find this post helpful? Yes | No

    Default Re: A strange problem

    Or try

    LCDOUT $FE, $80, #A

  3. #3
    Join Date
    Jul 2006
    Location
    Lazio, Italy
    Posts
    44


    Did you find this post helpful? Yes | No

    Default Re: A strange problem

    Thanks tasmod, with this statement "LCDOUT $ FE, $ 80, # A" now everything seems to work ok. But what has changed? I have always used "DEC A" and has always worked. What is the problem? Thank you again

  4. #4
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,139


    Did you find this post helpful? Yes | No

    Default Re: A strange problem

    Nothing changed. You forgot $80 before your variable.

    Ioannis

  5. #5
    Join Date
    Jul 2006
    Location
    Lazio, Italy
    Posts
    44


    Did you find this post helpful? Yes | No

    Default Re: A strange problem

    No, it is so, even this statement "LCDOUT $FE,$80,DEC A" does not work.

  6. #6
    Join Date
    Dec 2011
    Location
    IO93ok
    Posts
    190


    Did you find this post helpful? Yes | No

    Default Re: A strange problem

    I always did this from early PicBasic days. Can't remember why.

    #A Meaning the decimal representation of an ASCII value.
    I always assumed that in a loop declared as a character, the loop iterated the character the number of times in the loop (i.e. first time round, A=1 in decimal but A was still a character representing that value)

    Hope that makes sense.

  7. #7
    Join Date
    Jul 2006
    Location
    Lazio, Italy
    Posts
    44


    Did you find this post helpful? Yes | No

    Default Re: A strange problem

    Thank you for your interest, but I do not understand is that I have used this statement thousands of times with the 18F252 that I used before. Now I'm in trouble because I need to show the value of "A" sometimes using two digits (DEC2) and sometimes three digits (DEC3) and I do not know how.

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