Need to learn about LCD
T Chap
Posts: 4,223
I am going to order a serial LCD this weekend and have a few questions. I was going to get the Parallax 2x16 Serial LCD (Backlit).
What I want to do is to be able to have several areas change on the display while other stay the same. Also, I want to be able to scroll to an area of text, i.e. a numerical value of 36,000 and then press an up or down button and have the value change, then press a write button and hold it for 4 seconds to write the change to eeprom. Hopefully this is just as easily done on a serial LCD with 2 lines, although I need 4 areas of text to change independently.
Does this make sense in a very oversimplified example to cursor through the 4 fields of data to change, then inc/dec the data, then write it:
'user programming slot 2 bs2p40
writebut var in2
cursorbut var in1
decrebut var in3
increbut var in4
position1 var word 'a position that will store a value of 1-65,000
position2 var word
position3 var word
position4 var word
position5 var word
speed var nib ' a value to hold the pause times between pulses to stepper
accelpos1 var nib 'a value to hold accel rates for position1
cursorpos1 var nib 'value for where the cursor is on the lcd
cursorpos2 var nib 'value for where the cursor is on the lcd
cursorpos3 var nib 'value for where the cursor is on the lcd
cursorpos4 var nib 'value for where the cursor is on the lcd
cursorpos1:
cursorpos = 1 'sets cursor to top field
"info here to change data with incre/dec but in field/position 1
if cursorbut = 1 then cursorpos2
goto cursorpos1
cursorpos2:
cursorpos = 2 'sets cursor to 2nd field
if cursorbut = 1 then goto cursorpos3
"info here to change data with incre/dec but in field/position 2
goto cursorpos2
cursorpos3:
cursorpos = 3 'sets cursor to 3rd field
if cursorbut = 1 then goto cursorpos4
"info here to change data with incre/dec but in field/position 3
goto cursorpos3
cursorpos4:
cursorpos = 4 'sets cursor to 4th field
if cursorbut = 1 then goto cursorpos1
"info here to change data with incre/dec but in field/position 4
goto cursorpos4
What I want to do is to be able to have several areas change on the display while other stay the same. Also, I want to be able to scroll to an area of text, i.e. a numerical value of 36,000 and then press an up or down button and have the value change, then press a write button and hold it for 4 seconds to write the change to eeprom. Hopefully this is just as easily done on a serial LCD with 2 lines, although I need 4 areas of text to change independently.
Does this make sense in a very oversimplified example to cursor through the 4 fields of data to change, then inc/dec the data, then write it:
'user programming slot 2 bs2p40
writebut var in2
cursorbut var in1
decrebut var in3
increbut var in4
position1 var word 'a position that will store a value of 1-65,000
position2 var word
position3 var word
position4 var word
position5 var word
speed var nib ' a value to hold the pause times between pulses to stepper
accelpos1 var nib 'a value to hold accel rates for position1
cursorpos1 var nib 'value for where the cursor is on the lcd
cursorpos2 var nib 'value for where the cursor is on the lcd
cursorpos3 var nib 'value for where the cursor is on the lcd
cursorpos4 var nib 'value for where the cursor is on the lcd
cursorpos1:
cursorpos = 1 'sets cursor to top field
"info here to change data with incre/dec but in field/position 1
if cursorbut = 1 then cursorpos2
goto cursorpos1
cursorpos2:
cursorpos = 2 'sets cursor to 2nd field
if cursorbut = 1 then goto cursorpos3
"info here to change data with incre/dec but in field/position 2
goto cursorpos2
cursorpos3:
cursorpos = 3 'sets cursor to 3rd field
if cursorbut = 1 then goto cursorpos4
"info here to change data with incre/dec but in field/position 3
goto cursorpos3
cursorpos4:
cursorpos = 4 'sets cursor to 4th field
if cursorbut = 1 then goto cursorpos1
"info here to change data with incre/dec but in field/position 4
goto cursorpos4
Comments
·· If you're referring to the Parallax 4X20 Serial LCD, the concepts presented would be the same.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
Thanks Chris!!!
Is there some thing like the example on Getting started with Parallax serial LCD but for parallel LCD (2x16 Parallel LCD· from Parallax) with pictures on how to connect it tio the BS2, I am just starting with robotics and I don't understand the schematics that came on the books from Parallax, If any one can help me it will be great.
Thank's Humberto
<!-- unit price -->
the lcd only has 2 other connections, + and GND. The data sheets show the info. Look up the lcd under accesseries.