LED Matrix Question
sjogan
Posts: 17
I'm about to start working on lighting up an 8X8 LED matrix, and I have a programming question that's on my mind.
I am using a Propeller chip (naturally) and will be using two 74HC595 chips to light up the LED matrix. (with corresponding transistors to sink the cathodes, since the 595 can not do that by themselves.)
I am currently using jm_595_ez from the OBEX (from a previous project) and I expect to continue using it for this matrix. (thanks Jon!)
My question is: am I going to have two loops, one inside the other, to control the Row and Columns? I cannot imagine not having them looping like that, but I was wondering if there was a better way.
(the outer loop controlling the Rows and the inner loop controlling the Columns. or vice versa)
And I am expecting to have two instances of the jm_595 running, one for the rows and one for the columns.
If anyone knows of a better (or at least different) way of doing this, please let us know.
thank you
I am using a Propeller chip (naturally) and will be using two 74HC595 chips to light up the LED matrix. (with corresponding transistors to sink the cathodes, since the 595 can not do that by themselves.)
I am currently using jm_595_ez from the OBEX (from a previous project) and I expect to continue using it for this matrix. (thanks Jon!)
My question is: am I going to have two loops, one inside the other, to control the Row and Columns? I cannot imagine not having them looping like that, but I was wondering if there was a better way.
(the outer loop controlling the Rows and the inner loop controlling the Columns. or vice versa)
And I am expecting to have two instances of the jm_595 running, one for the rows and one for the columns.
If anyone knows of a better (or at least different) way of doing this, please let us know.
thank you
Comments
I had 595 chips turn on and off SN754410 chips to source current to some hgh power LEDs (6 x 6 array) and I used the high power shift registers to sink the current. (I used these chips since I knew how to use them. There are probably better ways to power a LED array though.)
There's also the option of just adding more 595 chips. With eight chips, you wouldn't need to worry about controlling the cathode. This isn't a very practical approach but it's what I used to drive a 10 by 12 array.
Lawson
All valid suggestions.
Or, if you use somewhat higher efficiency LEDs (mine run nicely on 1 mA, and are very bright at 5 mA), you can run it all in a multiplexed manner straight from a Prop with NO external hardware!
Just sayin'
Cheers,
Peter (pjv)
-Phil
The cathodes are driven from the 74HCT595; the anodes, from the 74HCT164. The data in the '164 is shifted on the rising edge of the '595's RCK clock. Whether or not a "1" is shifted in depends on the phase of SCK when RCK is sent, which is under software control. You do not need two '595s. The simpler '164 is adequate to replace one of them.
-Phil
and i figure i can use out3 and create an out4 if need.
way cool.
thanks.
regards
Good luck.
Paul