8x8 led matrix
PatrickS1981
Posts: 17
Hi,
I wanted to create an more advanced project to learn more about microcontrollers. I thought it would be fun to create a 8x8 led matrix. I saw there are dedicated controllers for it, but it should also be possible with row column addressing using 2x8 pins of my propeller.
Does anyone knows a sample project to see how this would be done? I need to know for instance if I need resistors to prevent damage to the LED's. Also I wonder how I can sync the row and column's to activate 1 unique led.
Hope someone can help me out,
Patrick
I wanted to create an more advanced project to learn more about microcontrollers. I thought it would be fun to create a 8x8 led matrix. I saw there are dedicated controllers for it, but it should also be possible with row column addressing using 2x8 pins of my propeller.
Does anyone knows a sample project to see how this would be done? I need to know for instance if I need resistors to prevent damage to the LED's. Also I wonder how I can sync the row and column's to activate 1 unique led.
Hope someone can help me out,
Patrick
Comments
I am no expert in this field, but if I am not mistaken, there should be many IC's available for this particular purpose (LED drivers).
If you want to attempt this without IC's, I remember seeing something in the OBEX about a capacitve approach to a pushbutton matrix, perhaps something similar could be used for LED output.
I suggest using IC's for this particular purpose.
Bruce
Then I would suggest at least looking at the datasheets for these drivers, to get a better understanding of addressing. Most of the time they will give a block diagram explaining theory of operation.
Bruce
The display doesn't need any drivers, the LEDs are driven directly from the output pins (with resistors). 16 outputs are needed, of course.
I think he wants to create it from individual LEDs. I believe he is searching for advice on how to wire the matrix using as few pins as possible. Of course he will need code also.
Bruce
I dont have any Spin code, but I've been working on something similar. But I can tell you that I've been using blue LED's on my projects that have a fairly high forward voltage, and haven't found it necessary to use current limiting resistors. If you have access to decent test equipment, the best thing to do is ramp up voltage on a bare LED until you either hit 3.3 V or the max current you want or the LED can handle. Since I've been making coin-cell powered Prop projects lately, running at ~2.9 V, I find even without a limiting resistor the blue LED's sink only about 2 mA, and are still very bright.
If you only want monochrome, and can handle the current, you can light all 8 LED's in a row at a time. If you want greyscale, you'll have to cycle through the LED's individually. Or you can designate a set time each row gets, and light all your ON LED's and turn off individual ones within that time period to get different brightnesses. Either way, you may find Spin not fast enough, and get visible flicker. That's where I am now, so I can't give any advice if Spin is fast enough to handle a greyscale matrix. I'm sure someone else has done this.
I really don't see the need to use an external driver chip unless you want to learn how to use them. Kind of defeats the point of using a Prop with all that power. But don't listen to me, I'm the idiot using a Propeller on my business card when a $0.50 uC would do.
http://www.winpicprog.co.uk/pic_tutorial_matrix_led_board.htm
You energize the column that the led you want to light is on and then ground the row it is on, that way current will flow from one propeller pin to the other, of course this needs a resistor to limit the current. R = (3.3-Vf)/If
You then energize each led in turn at high speed and nobody notices
Graham
Graham
You know you can use LEDs as input too? Perhaps that could be the next project
That was a nice link for an example.
Anyhow, can you get the same amount of control with the method that you suggest, as compared to using a driver?
Bruce
Burning stuff is best long term lesson you can learn. But like I said, this only works on blue LED's. Might as well add limiting resistors, you can always use 0 ohm resistors if necessary.
What level of control do you expect to get? Some of the chips have fonts etc, no problem for the prop, should be possible to modulate the brightness too if he fancies. The guy specifically said he wanted to learn how to do it himself. I'm not clear why you suggest things you are not familiar with? Large RGB screens might be a different story.
Not me.
Stop being so down on other processors
Graham
But as far as I interpret that board it's only good for simple on/off stuff .. like scrolling text.
If you want it more sophisticated you should try to build a board that allows "greyscale" pictures.
Why do I think the board is simple:
You have 64 LEDs. So, each LED is lit for 1/64 second if you have a refresh rate of 1Hz. As we all know this is not enough. At a refresh rate of 100Hz one LED is only lit for 1/6400 second. If you want to do PWM for creating greyscale, your on-time will drop further.
Instead you could:
Use transistors to drive a common cathode per row and output 8 pixels at once.
This means that the on-time at 100Hz will rise up to 1/800. With this value PWM might make more sense.
I am currently experimenting with an RGB LED. And especially the dim color values are hard to reach if the PWM does not have a good resolution. In other words in this case the LEDs will raise brightness very fast.
The OP was not sure how to address a single LED in an array, this lead me to believe that at least in the first instance scrolling text etc would be OK. We can let him decide what he wants, at least I hope this simple example shows the basic way it works and he can now understand the idea behind operating an entire row/col simultaneously using a transistor as you suggest.
Graham