running 64 leds with max 7219
youngbill
Posts: 54
Has anyone used a maxim 7219 to run 64 LEDS. Some of my questions are,do i run the leds off the segment pins? And if so..that only allows 7 leds?
Any Help or Code hints , thanks for any replys
Any Help or Code hints , thanks for any replys
Comments
Jim
Thanks again...
But with only 7 segments,,ahh multiplexed leds,,,so I guess i need to decide on the pattern of lights I want...I was thinking ,,,just a chase of 64 leds,,,that end up ALL ON.
Have you done a search on MAX 7219 (or MAX7219) in the new forum? It brings up quite a bite of hits.
Jim
Is there a shift>> that can shift a one in?
Also the max 7219 will not handle the current of 64 leds, should I use a transistor( I am planing to ),,,or use the app note 1196 driving higher currents?
Max can handle 64 individual LEDs, Remember the word Multiplexing.
It is made to run an 8-digit seven-segments LED-display. Thats 64 individual LEDs, the dots included. Needs only one current-limiting resistor because only one segment (or LED) is lit at a time.
The MAX works by rapidly enabling the common cathode line for each set of 8 leds, then lighting the individual anodes required for the chosen LEDs to light. Then it turns off that particular set (by turning off the common cathode line), and moves on to the next set of 8. This allows for driving 64 leds with 16 pins. It all happens so fast, you can't see it.
Current limiting is actually done through true current limiting internal to the chip (it's not because "only one segment (or LED) is lit at a time" -- in a sense, the chip has configurable "resistors" on every led anode line -- the value of that current limiting is set by the iSense resistor. A formula for determining that value is given in the chip datasheet. Technically, all 8 leds in a given common cathode bank might be lit at any one time (this is useful for determining total current draw of the project). For example, if you have each LED set to draw 20ma, and all 8 of a given bank are lit, then total max current draw for the LED display would be 160ma plus the chip's own overhead.
Attached is my code,,I want a 64 led chaser,,, ending with ALL the leds on.
I would attach a schematic,,,can anyone suggest how to draw the wiring out so I can post it also ( I have circuit maker,but I doubt many people would be able to view that)
So I should be able to chase 64 leds Correct?...and I should just run the leds direct ( ie no resistor ?) Many thanks for all the help on this great board.
Pls Comment on my code also.
One other thing,,,Decimal point pin 22 will this be used as is,,,ie will that pin run a leg of leds also..so do I need to activate DP...by adding 128?
Then remove the individual segment resistors for each LED and run 8 wires out for the "bank's" anodes.
When you have all 8 boards ready like that, connect EACH BOARD's "led number 1" wires together, and run one wire from that connection of 8. That is your wire for all "number 1 led anodes". Do the same for number "2" on each board, up through number 8.
At that point you should have:
8 cathode wires -- one to each board, where every LED cathode on the board is connected to each other and that cathode wire.
8 anode wires -- each goes to ONE led on EACH board, the same LED position on each board.
Now hook up those 16 wires to the MAX display. The 8 anodes are the SEGMENT lines and the 8 cathodes are the DIGIT lines.
When the MAX is fired up properly using SHIFTOUT with the correct commands, it "strobes" the cathodes very rapidly and takes care of everything, making all LEDs appear to be lit at once, or any given LED, etc. Additionally, there are commands for the MAX that let you dim the entire display (in 16 steps of brightness), as well as set blanking and such. The only two commands that are really critical for your purposes is to make sure HEX DECODE is OFF (otherwise it will interpret LED data bytes sent as "hex characters" for display on a seven-segment LED) and that you have the display size set to EIGHT DIGITS (8 "banks" of 8 LEDs).
To light all LEDs you would just shift out %11111111 to each "digit". Basically you can always send 8 bytes (one bit for each LED) to the MAX to tell it if any given LED is on or off. It takes care of making all the LED's "appear" to be lit at once.
Any way
I want the leds to chase on, in a long row,,,and stay on as the chase goes along,,,,Its starting to work,,,but now its a code thing,,,Can any one give any help to my code.