Need advice with LCD 2x16


Closed Thread
Results 1 to 10 of 10

Hybrid View

  1. #1
    Join Date
    Dec 2008
    Location
    Ploiesti, ROMANIA
    Posts
    582


    Did you find this post helpful? Yes | No

    Default Yes !

    I have good results, based on this "$FE, $14 - Move cursor right one position" :
    Code:
    if (temperature2/100) =>10 then
    LcdOut $FE, $c0, "OUT :  ", Sign2," ", DEC (Temperature2 / 100), ".", DEC Temperature2 dig 1, " ",223,"C " 
    else
    LcdOut $FE, $C0, "OUT :  ", Sign2," ", $14, DEC (Temperature2 / 100), ".", DEC Temperature2 dig 1, " ",223,"C " 
    endif
    Thanks !!!

  2. #2
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,154


    Did you find this post helpful? Yes | No

    Default Re: Need advice with LCD 2x16

    If you wanted to move over an extra character to maintain alignment, why not just add an extra blank after SIGN2?

    Code:
     
    if (temperature2/100) =>10 then
    LcdOut $FE, $c0, "OUT : ", Sign2," ", DEC (Temperature2 / 100), ".", DEC Temperature2 dig 1, " ",223,"C " 
    else
    LcdOut $FE, $C0, "OUT : ", Sign2,"  ", DEC (Temperature2 / 100), ".", DEC Temperature2 dig 1, " ",223,"C " 
    endif
    Moving the cursor can give misleading information unless you clear the display first. $C0 sets the cursor position to the beginning of the 2nd line, it does not erase what was written previously.

    Let's say it is displaying 25C and the reading changes to 7C. If you move over 1 position, the 2 will still be there, giving 27C.
    Last edited by Demon; - 26th April 2011 at 06:17. Reason: Cause the code alignment gets all messed up when I clicked POST
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

  3. #3
    Join Date
    Dec 2008
    Location
    Ploiesti, ROMANIA
    Posts
    582


    Did you find this post helpful? Yes | No

    Default Re: Need advice with LCD 2x16

    Thank you !
    I try my code in ISIS and work ok ; it' possible, in 'real life' to work bad...but I do not have -yet- the hardware.
    Please remove .txt from simulation file.
    Attached Files Attached Files

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