Go Down

Topic: Scrolling matrix display (Read 3 times) previous topic - next topic

Oracle

I'm working on making a scrolling LED matrix display.  I'm storing a 1-bit bitmap of the entire display content that's being scrolled in ram and then using a moving pointer to update the display with a portion of the ram area.  It my own idea, but I don't know if I'm reinventing the wheel or there's a better way to do it.  It's working beautifully; the problem is that I'm burning way too much ram with this technique.  A 100-character message will use 600 bytes of ram with my 5x7 font, which seems excessive when the MCU only has 1 or 2k.

What do people normally do to implement a scrolling display?


dxw00d

They keep the message data in the flash memory area, rather than in SRAM. See http://arduino.cc/en/Reference/PROGMEM

Oracle


They keep the message data in the flash memory area, rather than in SRAM. See http://arduino.cc/en/Reference/PROGMEM


I'm using program memory to store font and symbols, but for the actual message, I'm dynamically building it at run time.

EVP

You must have some kind of array that represents the led matrix? this is 8x8? so at any one time you only need to read the sizeof matrix from PROGMEM.

JoeN

#4
Aug 30, 2012, 10:33 pm Last Edit: Sep 23, 2012, 06:26 am by JoeN Reason: 1

I'm working on making a scrolling LED matrix display.  I'm storing a 1-bit bitmap of the entire display content that's being scrolled in ram and then using a moving pointer to update the display with a portion of the ram area.  It my own idea, but I don't know if I'm reinventing the wheel or there's a better way to do it.  It's working beautifully; the problem is that I'm burning way too much ram with this technique.  A 100-character message will use 600 bytes of ram with my 5x7 font, which seems excessive when the MCU only has 1 or 2k.

What do people normally do to implement a scrolling display?


You are taking your message which is in RAM and decoding it with the font which is in flash to precreate a bitmap which is necessarily large, in RAM.

Why?

I have a scroller and I do basically what you do but there is no problem decoding the text via the font on the fly with no need to store the bitmap anywhere except in the driver/shift registers.  The Arduino is fast enough for that, at least it was for me with 6 8x8 displays.

http://arduino.cc/forum/index.php?action=dlattach;topic=115559.0;attach=26003

http://www.youtube.com/watch?v=dl7_QG1xJfo



I have only come here seeking knowledge. Things they would not teach me of in college.

Go Up