AVR & Leds


(newest stuff at the bottom)

Feb/March 06:
My plan is to use a 8x8 led matrix, and make a small game. Maybe pong, or breakout, or something. The cheapest LED matrix I could find (Futurlec's LEDM88RG, for $1.90 each), was actually red and green in each cell, so now I will have 2 bits per pixel of color! (It can be red, green, or orange(both)!). I'm going to use shift registers on the rows & columns (those three IC's are 74HC164: 8-bit serial in/parallel out), so I don't need to use a ton of output pins on the microcontroller.

I'm using an ATMega8 by Atmel, which is awesome: 8MHz (can go 16Mhz if I change the crystal), 8KB Flash for program storage, 32 general purpose 8-bit registers, 1KB SRAM, and 0.5KB EEPROM. It has 23 general purpose I/O lines. The best part? It's only $3.66. The development board was about $16, and the programming cable was $12. (This was all from SparkFun, a pretty cool shop)

March 10th:
Here is a protoboard with some components on it:


It doesn't have the microcontroller and supporting stuff, because this is the prototype, and all that is on the dev board. Those 6 things at the bottom are buttons...I'm thinking a control scheme like Up/Down/Left/Right, and then A & B. Maybe a 'start' button as well...

March 11th:
Here is it about 50% wired:



March 12th:
Finally finished wiring it! (Man that was a lot of work):



Here is a short movie of a quick test of making some random LEDs light up:

blink2.avi
(300KB)
It's hard to see in the video, but they are red, green, and orange.

Unfortunately, my programming cable is about 3 inches long (parallel port). I have an extra 6' parallel cable, but it's the wrong gender. So currently, I have to crawl behind my PC everytime I want to reprogram the AVR :(
I'm building a correct gender parallel cable now, so I don't have to keep doing that. (Yeah...I know you can get them for $4...but I'm cheap)

Everyone keeps telling me I need to put resistors in series with the LEDs to limit current, but it seems to work ok without them, and thats 16*2 fewer solder joints I need to make. We'll see if anything burns out hah.


March 13th:
Here it is you can see the different colors possible:

One problem, is I am using shift registers without a latch. So as the data is shifted into place, it appears on the incorrect LEDs for a very short amount of time. Which causes them to light up a short amount of time. I'm not sure there is anything I can do about this, besides shifting the data into place faster: currently my AVR is clocked at 8mhz, but it supports up to 16mhz (I just need to put in a different crystal). I think best solution is to use a latch though.


More to come...

Back to home page