Shop OBEX P1 Docs P2 Docs Learn Events
Is there any way to scroll text on Parallax's serial LCDs? — Parallax Forums

Is there any way to scroll text on Parallax's serial LCDs?

Private19872Private19872 Posts: 61
edited 2014-04-10 13:52 in Propeller 1
I'm working on a project that uses this display (although I'm planning on getting this one) and I didn't like how the cursor wrapped back to the top of the screen when it hit the end of the screen. Is there some mode or something that makes it scroll the text up when a new line is added, or do I have to write the code to get this effect myself. If I have to write it myself, would it efficient to keep an array of all the screen characters, bytemove them and then copy it to the screen whenever a new line is added?

Comments

  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2014-04-10 13:10
    These LCDs are pretty basic. I suspect you would have to retain a whole line (16 characters) in RAM external to the LCD and have it resent when you reached the bottom of the screen. And you would really remain on the second line forever unless you included code to move around. If you wanted to save a lot of lines (previously transmitted ones) so that you could scroll up and down, a lot of external RAM would be required.

    If you wer using a BasicStamp, you just wouldn't have the RAM to do scrolling.

    The Propeller could do it. But how do you know where to start and end. Usually you open a .txt file for such and have a hard disk to read from. Pretty quickly it becomes dependent on more and more resources - software and hardware.

    If you have some limited lines of text, a minimal system could be easily worked out. But the LCDs don't save lines displayed in order to scroll. 4 lines will jump back to the top at the end too.
  • Private19872Private19872 Posts: 61
    edited 2014-04-10 13:22
    I was planning on just having a fixed array of 32 bytes and only retaining what was on screen. When I said scroll, I meant moving the text up like the TV Terminal object.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2014-04-10 13:39
    You could do that, but how to toggle between the retained 32 bytes, and new input?

    Of course, if the new input is always in 32 character blocks, life is simpler. If you want to just feed one character at a time, you have to count to 32 and make some decisions on where to go from there on the fly.
  • Private19872Private19872 Posts: 61
    edited 2014-04-10 13:45
    Lines would be added 16 characters at a time and I would just have to shift 17-32 to 1-16.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2014-04-10 13:52
    yes. 32 character blocks was wrong. It would be 16 character blocks, unless you had a <cr-lf> force a new line. Not too sure what you would want to do with stand alone <cr> or stand alone <lf>. Breaking text at spaces is another issue, or text will be broken in the middle of words.

    It sounds like you just want to scroll down as you read longer text, no scroll up. It certainly is feasible. I am just trying to mention some of details that might come up.

    At some point you really have to set a limit to how long your text will ever be. If it is not going to be over 64 characters, the 4 line display will make life simpler.

    It is 5 am here. I am going to bed.
Sign In or Register to comment.