A few years ago, when I finally got around to learning PIC programming, I decided to I wanted to create something that would run LED animations on a small 4x4 matrix. I liked the idea of the small 4x4 size because I was starting with a PIC 16F628A. This chip can not directly control the 16 lines necessary for an 8x8 matrix (unless you get fancy). Also the 4x4 arrangement just seemed easier to work with in terms of coming up with different patterns. And the patterns would require less memory. One frame on a 4x4 matrix is 16bits or just 2 bytes, but on an 8x8 matrix, a frame would require 8 bytes.
I also knew that I did not want to leave this on my workbench. Instead, I wanted it somewhere else in the house. Somewhere where I could see it often and where anyone visiting might notice it. To me this meant that it couldn't just be on a PC board or a breadboard (where most of my projects are). I got the idea of building a small frame with horizontal and vertical bars. These bars would be the rows and colors of the matrix, and I would solder an LED at the intersection of each one. This has worked reasonable well. The problem, I found, is that steel is not the best metal for this since it has rusted slightly and has trouble holding onto the solder. But still, it has been running for about five years. Originally it was in the dining room, but, since we moved about two years ago, it has been in the kitchen, on a small shelf. Most people don't comment on it, a few ask about it, and one thought it was reading her mind.
Once I had it had it built, I then spent a lot of time coming up with as many different animations as I could think of. This was really fun. The video shows almost all of them. Some of the animations are described in the code frame-by-frame, as you might imagine. But for others, I added code that would allow me just to list the LEDs by number that would light up in sequence. These path-style animations saved a lot of memory because instead of needing two bytes to describe a frame, I only needed half a byte to specify the next LED in the path. There are also some animations described procedurally (for lack of a better term). For these animations, each step is described as an action, such as invert frame or invert center. This method was my original plan, but I found that it was not as interesting as I envisioned, and the code for all of the procedures took up too much memory. I will talk in detail about the theory behind each of these animation styles in a later post.
One of the things you might notice in the picture of the back is the strange choice of transistors. This is what happens when you don't know what you are doing. I hope since then I've learned a little more about the difference between PNP and NPN.
Here are pictures of the front, back, and some detail. I also learned that there is a big difference between thinking of building a small square frame and actually building a frame that is square.