Being relatively new to electronics in general and microcontrollers in particular, I am still in the “getting excited about blinking lights” phase. So, if a single blinking LED is sort of interesting, how cool are 64 of them? Like Collin Cunningham says in his video “The LED matrix has a bit of a reputation among electronics hobbyists” … and of course, I wanted to play PONG on it.
AS1100 – fully compatible to the MAX7219
I got an 8×8 matrix some time ago, but figured that controlling 64 LEDs from a bare Arduino is a bit painful. Looking for examples, I found projects using current limiting resistors, switching transistors, and 74HC595 shift registers. So in the end, like in Collin’s video, I went for the MAX72xx LED drivers (MAX7219 or MAX7221). Those chips are designed to either drive an 8 digit 7-segment display, or an 8×8 LED matrix. It is a little on the expensive side though. For example, the MAX7219 is EUR 9.15 at Digi-Key. To put this in perspective, the ATmega328P driving the Arduino UNO is EUR 2.71.
But there is an alternative. The AS1100 from austria microsystems is fully compatible to the MAX 7219. Best of all, they do free samples. But otherwise those chips seem to be difficult to get in small quantities. The DIP version for example, is a non-stock item at Digi-Key. If anyone has a source suitable for hobbyists, please leave a comment.
I wrote my PONG game as an Arduino library and put it on github. The library implements the core of the game. Subclasses of the “Pong” base class implement virtual functions to display the ball, paddle, score, intro animations, etc. on the “screen”, see MatrixPong.ino in the examples directory. This way I was able to re-use the same base code for the LoLShield: