Max7219 library for siingle leds on and off

Does anyone know of a simple library to control the max7219. Im making a light matrix of 4x8 bi colour leds, so essentially a 8x8. I just want to turn on and off specific leds, but the only stuff i can find is for scrolling text and such for 8x8 matrix but mine is for 4x8 but 2 colours. If anyone can point me in the right direction would be fantastic.

Okay. Please list what's wrong with LedControl in more detail. I've used it for exactly what you describe. Look at the 3rd example, LCDemoMatrix. (yes, I know, I have no bloody idea why they chose LC as the prefix for the examples, makes one think they had LCD on the brain).

If you're looking for something that says 4x8x2, you're probably out of luck, but 8x8 is what you want, you might need to revise how you think about the representation is all.
I don't vouch for the code, by the way, I'm just pointing out one source.

How is your 4x8x2 wired?

Are the LEDs bicolor, the kind that are green when current flows one way and red when current flows the other?

Do you have a link to any info on it?

a7

Two lead bicolours won't work, you'll need three lead bicolours. Two lead bicolours need the current to reverse, can't be done with the 7219 AFAIK.

The leds are a common cathode blue white 3mm led, so the have 2 annode legs.

They are the 3leg bi cours.

Ill have another look, i guess i dont understand it. I just assumed there would be code to switch col3 row 4 on etc. ill check tomorrow with fresh eyes.

Ah. Look again at that LCDisplayMatrix code. That can be seen in the way they're doing the driving.

So yeah, this function

void LedControl::setLed(int addr, int row, int column, boolean state) {//... 

should let you turn in and off individually LEDs.

You just have to keep track of what columns or rows are green and which are red or whatever.

a7


So i made the matrix to test, i uploaded the ledmatrix code to the arduino. So most of the leds stay on a couple blink. I can test each row and column with the multimetre and it all checks out. When i hook it up to the max7219 it does as I described. Whats the chances the max is screwed? All the relevant resistors and capacitors are in place.


Everything is probably fine. Separate the Arduino + MAX7291 from the matrix; test both individually.


MAX7219:

Leave the matrix of LEDs out of the circuit, and use just one LED. Use jumper wires to place that LED at various matrix positions, electrically speaking, and see if you can turn that one pixel on and off using the library setLed() method I mentioned in #10 above. Start with Row 2 Column 5. OR anywhere you want. :expressionless:


Matrix:

Can you test each row and column with probes for 5 volts and ground (and a series current limiting resistor) and with that ad hoc instrument see...

...one LED segment illuminate at a time?

If they both pass their more stringent and informative tests but fail to work together, we will need to go to second steps.


Can you supply a better picture of the backside wiring? Sry, but that wiring looks like crap unfocused.

Please hand draw and post a schematic of the matrix, and how and where it is wired to the Arduino board and MAX 7219s and where power comes from and how it is routed.

HTH

a7

Gotta go, but quick observation. 64 LEDs and a MAX7219, cannot be powered from Uno/Nano onboard regulators - overheating and shutdown or worse, burnup, will ensue. USB is marginal, but I try not to load it that heavily, because without USB ports my portable is a door stop.
Use a separate 5VDC power source and connect the grounds for signal continuity.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.