LCD wierdness ..
Justin Pentecost
Posts: 14
This one (like all my problems) is driving me up the wall ...
This piece of code takes an 8 bit variable from an attached EEPROM and then output it to the Matrix Orbital GLK24064-25 LCD screen ..
When the data is over the last value is 255 and on that the sub returns to the main program ..
lcio is a constant with a value of 240
ByteDisplay:
GOSUB eeread
eeaddr = eeaddr +1
SEROUT 11,lcio,[noparse][[/noparse]eedata]
IF eedata <> 255 THEN Bytedisplay
return
This will produce nothing on the screen ...
However this ...
ByteDisplay:
GOSUB eeread
eeaddr = eeaddr +1
SEROUT 11,lcio,[noparse][[/noparse]eedata,eedata]
IF eedata <> 255 THEN Bytedisplay
return
will produce each character twice ..
Does anyone have any idea ..
·
This piece of code takes an 8 bit variable from an attached EEPROM and then output it to the Matrix Orbital GLK24064-25 LCD screen ..
When the data is over the last value is 255 and on that the sub returns to the main program ..
lcio is a constant with a value of 240
ByteDisplay:
GOSUB eeread
eeaddr = eeaddr +1
SEROUT 11,lcio,[noparse][[/noparse]eedata]
IF eedata <> 255 THEN Bytedisplay
return
This will produce nothing on the screen ...
However this ...
ByteDisplay:
GOSUB eeread
eeaddr = eeaddr +1
SEROUT 11,lcio,[noparse][[/noparse]eedata,eedata]
IF eedata <> 255 THEN Bytedisplay
return
will produce each character twice ..
Does anyone have any idea ..
·
Comments
·· What does the following code produce (Note the DEC modifier)?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
SEROUT 11,lcio,[noparse][[/noparse]DEC eedata,13]
and SEROUT 11,lcio,[noparse][[/noparse]DEC eedata,eedata]
All do what they are supposed to do .. Also if you debug back to the computer No problem all the data is perfect ..
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
This code does not work .. BUT it does see the 255 to stop it ...
ByteDisplay:
GOSUB eeread
eeaddr = eeaddr +1
SEROUT 11,lcio,[noparse][[/noparse]eedata]
IF eedata <> 255 THEN Bytedisplay
return
However if you change the line to
SEROUT 11,lcio,[noparse][[/noparse]eedata,eedata]
Then it repeats the data
In short I can get it twice but not once ..
I'm guessing the data is OK because I can debug it and I can display it twice ..
also running the code without the rest of the program creates the same effect (Ie no display) .. Theree is data because it debugs ..(correctly) ...
·
·· You re-posted the same information as in your first post.· Without a complete program I highly doubt we'll be able to help you.· What is receiving the data and displaying it.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com