Easy scrolling LED Message Board with mbed

Tipped off by my friend Gregory I recently bought an LED panel with 32x64 two-color pixels (that is a total of 4096 LEDs!, ref. DE-DP100 from Sure Electronics). I wanted to make some sort of message board out of it, but I was not sure what would be the easiest way.
Tipped off by my friend Gregory I recently bought an LED panel with 32x64 two-color pixels (that is a total of 4096 LEDs!, ref. DE-DP100 from Sure Electronics). I wanted to make some sort of message board out of it, but I was not sure what would be the easiest way. And then suddenly it struck me: why not use an mbed module? The mbed module would offer me programming in C/C++ and a USB file system that would be perfect for storing message files written on a PC. mbed is for fast prototyping and this would be a nice project to see if mbed’s promises would hold true.

The LED panel has an SPI-like interface and is rather easy (albeit a bit bizarre) to control. It took me some time to figure out that the datasheet provided by the vendor had the CLK and the LATCH lines swapped, but after that I was able to put pixels where I wanted them and in the color of my choice (red, green, orange and black).
The next step was to add a font so that I could write text. If you have ever bitmapped a font you know how tedious a work that is, so I turned to the web. A quick search found me a freeware utility called The Dot Factory and 10 minutes later I had a C source file ready with all the printable characters from an 8-point Arial font (but that could have been any of the fonts available on my PC). That is so much faster than doing it by hand! Another 15 minutes of coding later I was able to print a string on the display anywhere I wanted.
Now I needed a way to get text from a file on the display, together with some commands to control the way the text would be shown. This meant adding an mbed file system object to my code (1 line). Of course I wanted text scrolling, color & position control so I decided to use an INI file for this. A new search on the internet found me a neat little C library named inih that turned out to be very ergonomic: importing and integrating it into my mbed project took a mere 5 minutes; I am definitely going to keep this library!
The final task now was to implement text scrolling properly. This was actually not too difficult using a cheat and thanks to the way the font was implemented. About one hour later I had it all working the way I wanted.

This is the point where features started creeping in. It would be nice to have several pages of text, scrolling should be possible in both directions, scroll speed per line, etc., etc. This is also the point where I started wasting time. Add feature, compile, check, change, compile, check, change, … After some hours of this I decided to stop and freeze the project; you have to draw the line somewhere.
The result is pretty satisfying. The message board can now display seven pages of four lines of text. For each line you can specify a color, an (x,y) position and a scroll speed and direction. Two global parameters allow you to control overall scrolling speed and display brightness, but these are not so useful. I added a push button to browse the pages. Watch this short video to see the result.
Where is the integrated player?
The mbed environment really helped to finish this project quickly, the hardware is ridiculously simple and the software is pretty small. The executable is 51 KB and needs 5.5 KB of RAM (mainly for message storage). All in all I think I spend about one day cooking this up, that’s not too bad, isn’t it?
You can download the source code from here.
Discussion (4 comments)
marcey 11 years ago
Hi, I am in Australia and I get all my LED Supplies (including LED Matrixes, LED fluro tubes, multi-coloured LED ropes etc...) From a company called: Tenrod, www.tenrod.com.au Ph:(+612) 9748 0655 Fax: (+612) 9748 0258 they also have branches in Melbourne, Brisbane and Auckland (NZ).
I hope hat this helps.
Marcel Schultejohann (ELEKTORRIZED Subscriber.)
Sydney, Australia.
DE517587 11 years ago
Hi,
I think the LED-Matrix is no more available at http://www.sureelectronics.net (?)
Does someone have an alternative source for it ?
is it possible, to 'cascade' this Panels somehow ?
(e.g. two or three in a row ?)
ClemensValens 12 years ago
LDR 12 years ago
Vapula 12 years ago
11 years ago
why do you post that the CLK and latch Lines are swapped ??? its not true. The Picture with the Connections are false. NOT 2,4,6,14,16 are ground it is exaclty what the vendor says 1,3,5,13,15
So do you post false things.... ???
ClemensValens 11 years ago
If my code runs without modification on your system, the CLK & Latch lines are swapped. I checked the datasheet of the LED panel and you are right that my pin numbering is inverted compared to the datasheet, but that is not really a problem since I mentioned the pin names and the pins are not numbered on the PCB. It is only a matter of which pin you call pin 1.