Shop OBEX P1 Docs P2 Docs Learn Events
LCD wierdness .. — Parallax Forums

LCD wierdness ..

Justin PentecostJustin Pentecost Posts: 14
edited 2005-11-11 15:10 in BASIC Stamp
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 ..

·

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-11-10 15:18
    Hello,
    ·· What does the following code produce (Note the DEC modifier)?
    ByteDisplay:
    GOSUB eeread
    eeaddr = eeaddr +1
    SEROUT 11,lcio,[noparse][[/noparse]DEC eedata]
    IF eedata <> 255 THEN Bytedisplay
     
    return 
    
    

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • Justin PentecostJustin Pentecost Posts: 14
    edited 2005-11-10 16:44
    Sorry didn't mention that I'd tried that .. it's fine the output is perfect as is ...

    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) said...
    Hello,
    ·· What does the following code produce (Note the DEC modifier)?
    ByteDisplay:
    GOSUB eeread
    eeaddr = eeaddr +1
    SEROUT 11,lcio,[noparse][[/noparse]DEC eedata]
    IF eedata <> 255 THEN Bytedisplay
     
    return 
    
    
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-11-10 22:20
    So, is your problems solved then?· I'm not sure if something is still wrong.· And if it is, we'd need to see the whole program, sicne you're not showing where it reads the data from the EEPROM.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • Justin PentecostJustin Pentecost Posts: 14
    edited 2005-11-11 08:42
    Chris Savage (Parallax) said...
    So, is your problems solved then?· I'm not sure if something is still wrong.· And if it is, we'd need to see the whole program, sicne you're not showing where it reads the data from the EEPROM.

    No it's not solved sorry I made didn't explain very well ..

    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) ...

    ·
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-11-11 15:10
    Justin,

    ·· 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
Sign In or Register to comment.