??? 01/23/06 16:49 Modified: 01/23/06 17:02 Read: times |
#108106 - exactly Responding to: ???'s previous message |
hi,
Ian Bell said:
You did not say how you interface to the hardware but let's assume you just copy 48 bytes from the 8051 to the display. To make it scroll you just need to write different data into the 48 bytes. To make it scroll in one direction you just move the bottom 47 data bytes up one byte and put new data in the bottom byte. In fact, there is no difference how many characters have been scrolled. Let assume, any character is 7 lines x 6 columns (including space column). The technology I would use named LILO (last input - last output): There is temporal buffer of 48+6 bytes. 48 bytes are used as refresh buffer. At initialization time they should be cleared. Refresh interrupt takes data byte by byte from this buffer and makes shift to LEDs. Last 6 bytes are for new character to be scrolled in. Any time I need to scroll I do move 53 bytes left or right depend on scroll direction. At each six scroll I load new character from EEPROM and translate it via bitmap table then place 6 bytes of result into last positions. If character is End of String then I re-initialize EEPROM to read message from beginning and read the first character of string. Now about considerations. - Assume bytes represent columns. One byte = one column. If it is not so then you need to make scroll bit-by-bit which is slow but still possible with fast MCU. - Moving of array should be done between refresh interrupts. Othervise bad visual effects may appear. - If EEPROM is slow to be read (I doubt on this but who knows) then you should start reading cycle at the first scroll so that data must be ready before six scroll has been done. There is another technique named "circular buffer". It requires no moving but 48+48 bytes of memory and some additional framework with data pointers. I would not use it for your task. But if you interest I may try to expain its realization as well. Edited: an idea how to reduce memory usage come too late but it is possible to use the same size of array 48+6 bytes with last technique. I need time to elaborate and explain. P.S. I do not need to be named "elite" here. Regards, Oleg |
Topic | Author | Date |
Very long message multiplexing | 01/01/70 00:00 | |
Speed? | 01/01/70 00:00 | |
does not matter | 01/01/70 00:00 | |
How Many Chars on Display? | 01/01/70 00:00 | |
To Ian | 01/01/70 00:00 | |
Hardware? | 01/01/70 00:00 | |
Hardware,Ian | 01/01/70 00:00 | |
Hardware | 01/01/70 00:00 | |
When erik and oleg can spare time? | 01/01/70 00:00 | |
Such impudence! | 01/01/70 00:00 | |
exactly | 01/01/70 00:00 | |
a circular buffer does not require data | 01/01/70 00:00 | |
indeed but![]() | 01/01/70 00:00 | |
circular buffer | 01/01/70 00:00 | |
Really Dan I said experienced.. | 01/01/70 00:00 | |
Are you the 1st one? | 01/01/70 00:00 | |
by the way I have no experienceI | 01/01/70 00:00 |