It would be easier to explain if we could have referred to your hardware arrangement, however...
The thing to remember here is the display of your character (which you're probably already doing) RELATIVE to your display "window" at any instant in time...
There are many ways of doing this... here's one explained as a generalisation...
Say you have an 8 x 5 LED matrix. That's 8 LED's vertical, and 5 LED's horizontal. This is your display "window". You wish to scroll thru the letter 'A' horizontally. Now the letter 'A' is made up of the following (vertical) lines where each byte represents one vertical column of LED's, and where the five bytes together make up the character 'A'...
$7C - 01111100
$12 - 00010010
$11 - 00010001
$12 - 00010010
$7C - 01111100
Might be a little difficult to visualise until you draw it out (use a blank for zero and a blob for '1' and you find the 'A' is lying on it's R/H side)...
Now... to scroll thru the character, the element has to pass thru the display window like so...
$00,$00,$00,$00,$00 - Step 1 - nothing is displayed
$00,$00,$00,$00,$7C - Step 2 - L/H edge appears
$00,$00,$00,$7C,$12
$00,$00,$7C,$12,$11
$00,$7C,$12,$11,$12
$7C,$12,$11,$12,$7C - Step 6 - entire character displayed
$12,$11,$12,$7C,$00 - Step 7 - character starts to scroll thru
$11,$12,$7C,$00,$00
$12,$7C,$00,$00,$00
$7C,$00,$00,$00,$00 - Step 10 - almost gone just R/H edge...
... then go repeat all over from Step 1...
Now, to reitterate... our display consists of five bytes of eight bits, where each bit of that byte represents one column of eight vertical LED's, and the five bytes together make up our five columns. You have to pause displaying one whole set of bytes, before progressing onto the next step (next line of bytes). This pause becomes our scroll speed control. As you progress from Step 1 thru to Step 10 your character 'scrolls' across your display 'window'.
Probaly clear as mud...
If you're using serial latches, depending on your method of interconnecting them, you might be able to feed a byte into one end and the byte at the far end falls into oblivion which automatically causes a scroll. This seriously reduces processor overhead as you're only outputting one byte per scroll step (rather than as in our above example five)... but this is another story for another time...
Melanie




Bookmarks