Variable on LCD
Hey all,
I've just recently bought the Parallax 2x16 Serial LCD and was wondering if it is possible to display the state of a variable on it. Like you can on the Debug Menu.
DEBUG ? Variable
And thank you all for your help in the past.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Dan Taylor
I've just recently bought the Parallax 2x16 Serial LCD and was wondering if it is possible to display the state of a variable on it. Like you can on the Debug Menu.
DEBUG ? Variable
And thank you all for your help in the past.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Dan Taylor
Comments
If you read the documentation at this link http://www.parallax.com/Portals/0/Downloads/docs/prod/audiovis/SerialLCD-v2.0.pdf·it tells how to configure your display and gives code snippets to get you started.
You will want to keep track of the cursor position and be aware of what your program is displaying so that you can·format the way the display looks and prevent one line overwriting another at the wrong time. You will achieve this by sending control codes to position the cursor or clear the screen before you send your characters, it's all listed in the docs.
Something simple might look like the following
x=4
SEROUT tx,baud,[noparse][[/noparse]22]·· ' turn the lcd on , no cursor , no blink
SEROUT tx,baud,[noparse][[/noparse]128]· ' place the cursor at line 0 position 0
SEROUT tx,baud,[noparse][[/noparse]"x=",DEC x]· ' display the variable on the LCD
hope this helps
Jeff T.
Thats exactly what I wanted!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Dan Taylor