parallel LCD - displaying current value of a variable - HOW?
charlieknox
Posts: 27
I would like to display the current value of a variable on a parallel 2x16 (Hitachi) LCD panel, as the program (attached - check it out) runs, and the value changes.· I have found wonderful documentation on how to display text such as "Hello, this is the LCD demo." and "The BASIC STAMP!" and "THE BASIC STAMP "·" IS VERY COOL! " on 2 lines on the panel, but I cannot get the current value of a numerical variable sent to the LCD and displayed.· With the following lines (second x in the Msg line in quotes):
y······ CON·· $37··································· 'Display 7 for y value
x···· VAR·· Word··································· 'Loop counter
Msg· DATA· "y is ", y ,"; x is ", x , 0···· 'I would like to show the current value of x - the loop counter.· How??
x = x + 1············································· 'Loop counter x, which I would like to display on the LCD
it will display·················· y is 7;· x is······· with quotes on the second x in the Msg line, above, but will not show a numerical value for x when the quotes are removed, and will give an "Undefined Variable" message if I try to download the program without the quotes on the second x to the BS2.· I have also tried x DIG 0 + $30.· If anyone knows how to do this, please let me know.
Thank you !!
Charlie
y······ CON·· $37··································· 'Display 7 for y value
x···· VAR·· Word··································· 'Loop counter
Msg· DATA· "y is ", y ,"; x is ", x , 0···· 'I would like to show the current value of x - the loop counter.· How??
x = x + 1············································· 'Loop counter x, which I would like to display on the LCD
it will display·················· y is 7;· x is······· with quotes on the second x in the Msg line, above, but will not show a numerical value for x when the quotes are removed, and will give an "Undefined Variable" message if I try to download the program without the quotes on the second x to the BS2.· I have also tried x DIG 0 + $30.· If anyone knows how to do this, please let me know.
Thank you !!
Charlie
Comments
http://forums.parallax.com/showthread.php?p=615670
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support