Writing Variables to Serial LCDs
This will hopefully be a pretty easy question for most of you to answer...
I have the SX Tech Board with SX28AC/DP chip and a Parallax 2x16 Serial LCD. I can display text just fine, but I cannot for the life of me figure out how to print a numeric value from a variable to the LCD. Does anyone have a code snippet or explanation as to how to do this? I appreciate your help very much.
I studied the RFID Reader and Serial LCD sample projects in the Help section, but I still can't quite figure it out. I've also looked at the sample programs for both SX/B and BS2 for the serial LCD, but displaying numeric variables doesn't seem to be as straightforward in SX/B as it is in PBASIC. Thanks!
I have the SX Tech Board with SX28AC/DP chip and a Parallax 2x16 Serial LCD. I can display text just fine, but I cannot for the life of me figure out how to print a numeric value from a variable to the LCD. Does anyone have a code snippet or explanation as to how to do this? I appreciate your help very much.
I studied the RFID Reader and Serial LCD sample projects in the Help section, but I still can't quite figure it out. I've also looked at the sample programs for both SX/B and BS2 for the serial LCD, but displaying numeric variables doesn't seem to be as straightforward in SX/B as it is in PBASIC. Thanks!
Comments
Declare it with:
It accepts a byte sized numeric variable and directly displays it as a HEX or a DECIMAL STRING.
This saves code space on your main processor.
For example, to display a variable temp, just output using SEROUT ESC, "N", temp
and the value of temp will magically appear on the screen.
See www.fd.com.my/products/ilcd/ilcd.php
Good Luck.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.fd.com.my
www.mercedes.com.my
I really appreciate the code snippet, but I still can't seem to get it to work. I copied the code verbatim and defined the variables and function as necessary. The output is still incomprehensible on the LCD screen. Is the position value just another working variable? Here's how I'm using the code as of now...
Where...
The second line converts the digit from a number to the correct ASCII code.