Using MAX7219 and MXA002 LED Seven-Segment

Greetings Everyone!

After wrapping up a 40-year career in mainframe programming, I'm just learning how to use micro processors. I've had pretty good success so far with Arduino, but I've run into a brick wall on the current project. I would surely appreciate any help you experts could give me!

I've got a Nano Mega328 feeding SPI commands to a MAX7219 mux LED driver. The setup runs a small 4-digit display perfectly, (COTCO LD2-BW30GU-C11).

My problem is trying to drive a larger 5" display (MAXX MXA002) which needs 12 volt. I have the 5-to-12V converter board (MXA008) made by the same company.

While the COTCO display is scrolling numbers just fine, at the same time, the MAXX segments are all on at full brightness. There are some very slight intensity changes, as digits change on the COTCO display. (I'm only using one MXA002 digit to test.)

[Schematic below updated to show two caps and a resistor.]

Any suggestions? The manufacturer in Thailand was unable to help me.

The data sheets are pretty sketchy for the MAXX components:

If it helps, here's a short clip from a week ago when the COTCO display first went live

I would use SPI. 10, 11 and 13
You need the ground of the 12 V supply connected to the ground on the Arduino.
Your Arduino needs 5V not 6 V !. OK, sorry you have a nano

Your Arduino needs 5V not 6 V !. OK, sorry you have a nano

Equally true for Nano. 5.5V absolute max.

Where's your code ?
Did you see this ?

I've tried both common ground and separate ground. Makes no difference.

As larryD says, the grounds must be connected together for a circuit like this. The fact that this makes no difference is an important clue. I suspect it may mean that the inputs to the driver board are either floating, or receiving an incorrect voltage on the cathode input. This incorrect voltage means that the cathode driver pnp never switches off, so the segments are displaying all 4 digits in quick succession.

Is your sketch still displaying the same number on all 4 digits, as shown in the video?

What happens if you remove the smaller display modules completely?


Thanks so much guys, for taking a look at this.

First, I just wanted to point out again that the Nano/MAX7219 setup is giving me good results on the little COTCO display. Nevertheless, I have reduced voltage to the Nano from 6 to 4.5, as suggested, but it has no effect on the problem with the MAXX display.

Next, I’m using the LedControl library ( which specifically supports MAX7219. They prefer to use pins 10/11/12 for SPI, so that’s what I’m doing.

Per recommendation, I will use a common ground between power supplies. See updated schematic below.

The code is attached, but it’s trivial.

@PaulRB: Yes, the sketch is still giving me the same results on the COTCO display as shown in the first video. But the problem remains: all segments on the MAXX display are always on.

Nothing changes when I remove the COTCO components from the board.

I can disconnect all 8 jumpers at the input of MXA008, and all segments stay on.

Disconnecting C1 at the input of MXA008, shuts off all segments.

Another video clip…

Any further suggestions will be greatly appreciated!

Numerics.txt (1007 Bytes)

Well, that video was helpful, especially at the end when you pull out the wires to the large display and nothing happens!

I suggest you need to do some basic testing on the large display and its driver board. Forget the Nano, max7219 and small displays for the moment. Just connect the cathode input to 5V, and all anodes to 0V. Are all segments now off? If not, try the cathode connector at 0V. Next connect one anode to 5V. Does one segment come on? In other words play around until you have on/off control of one segment. Don't leave the cathode or any anodes floating, they must be connected to either 5V or 0V. Let us know what you find.

Thanks for the suggestion, Paul. (I'm Phil, BTW)

I tried working with just the large display and its driver. Here's the results...

Input to MXA008:
All anodes at 5V, cathode (C1) at 0V: all segments are off.
All anodes at 0V, cathode (C1) at 5V: all segments are on.

In either case, connecting/disconnecting some (or all) anodes makes no difference.
In the 2nd case, once C1 is disconnected, all segments go off.
I cannot get control of any single segment, no matter what I do.

Have you taken a look at the "data sheets" for these components yet? They're not much use, but maybe there are some clues.

Thanks so much for your time!

Hi Phil,

You tried cathode to 5V and anode to 5V then 0V? And cathode to 0V, anode to 5V then 0V? Don't just disconnect the anodes/cathodes, that's not the same thing as connecting to 0V/gnd.

If you still get no joy, put the control board aside and test the display module directly with 12V. Surely you can get individual segments on that way!

Yes, I had a look at the data sheets. The display is straight forward. The control board... I think I understand but I'm not the best around here when it comes to transistors. It seemed to me that the anode drivers might be inverting, logically, so a 0V input might switch them on. But I'm not 100% certain. If I am right, this may present a problem driving them with max7219.

If the worst comes to the worst, you can wire up those displays as common anode and drive each one with a tpic6c595. Dead easy.


I’ve finally got something going here.

Per your first suggestion, when I connect cathode and all anodes to 5V, the display is dark. Then, disconnecting (or grounding) an individual anode turns that segment on. So I do have some kind of control over individual segments.

On page 5 of the MAX7219 data sheet, it says “when a segment driver is turned off, it is pulled to ground.” And when a digit driver is turned off, it is pulled to V+. Sounds like the the opposite of what I need. Does that mean the MXA008 driver board is acting like a common anode device? See

The data sheet mentions that MAX7221 handles things differently. Is it possible that a MAX7221 might work here?

Your second suggestion (cathode to 0V, anode to 5V then 0V) leaves all segments off at all times.

Thanks again - Phil

Hi Phil,

No, the controller board is definitely common cathode, but its logic seems to be inverted, compared to what the max7219 uses.

I've never used max7221 but I understand it is no different to max7219 in this respect.

So three options: either find a way to invert the segment signals from the max7219, or abandon the max7219 and drive the controller board directly with Arduino outputs, or use a couple of 74hc595 shift registers. Both those latter suggestions mean the Arduino must do the multiplexing, which is quite do-able. Or my previous suggestion of abandoning the max7219 and controer board and drive the displays with tpic6c595.



All right, I'll look into using 74hc595 or tpic6c595. Are there any examples or tutorials that you would particularly recommend? Do you have a favorite code library for use with that hardware?

Thanks again for your time -- Phil

I’ve been reviewing the situation:

when I connect cathode and all anodes to 5V, the display is dark. Then, disconnecting (or grounding) an individual anode turns that segment on… On page 5 of the MAX7219 data sheet, it says “when a segment driver is turned off, it is pulled to ground.”

Yes, from the max7219 data sheet:

SEG A–SEG G, DP: Seven Segment Drives and Decimal Point Drive that source current to the display. On the MAX7219, when a segment driver is turned off it is pulled to GND.

So the control board’s segment/anode inputs are inverted compared to the segment signals from the max7219. We can overcome that in software, by programming bit/segment-patterns which are also inverted (i.e. 0=segment on, 1=segment off).

when a (max7219) digit driver is turned off, it is pulled to V+… Your second suggestion (cathode to 0V, anode to 5V then 0V) leaves all segments off at all times.

Again, I think you have correctly interpreted the max7219 data sheet:

DIG 0–DIG 7: Eight-Digit Drive Lines that sink current from the display common cathode. The MAX7219 pulls
the digit outputs to V+ when turned off.

So for cathode signals also, the control board needs the inverse of what the max7219 signals give us. We can’t fix that in software. What do you have that could invert the max7219 signal? Any 7400-series or 4000-series chips in your kit-box? e.g 7400, 7401, 7402, 7404, 4000, 4001, 4009… anything with inverting outputs? Or even a transistor can be turned into an inverter. Almost any npn can be used as in the diagram below. Try Rcol=10K, Rbas=4K7

You could make this thing work yet!


To invert the segment/anode signals, you could modify the LedControl library file LedControl.cpp:

void LedControl::setDigit(int addr, int digit, byte value, boolean dp) {
    int offset;
    byte v;

    if(addr<0 || addr>=maxDevices)
    if(digit<0 || digit>7 || value>15)
    spiTransfer(addr, digit+1,v);

by adding the line:

v = v ^ B11111111;

before the line:



I've hooked up just the display and its driver board to a couple of 7404's. I think I've got the basic logic figured out.

I'm going to invert the cathode, and all of the anodes as well.

Thanks for the inversion code. I may wind up using it. We'll see what happens.



I'm getting a usable display on the large digit now (MVI 4484 - YouTube).

A minor problem is that the display is about half intensity when the cathode is hooked to the 7404. I get full intensity if the cathode is plugged into Vcc. Not sure what that's all about.

I will try inverting the anodes via software as you suggested. I also have to hook up 3 more large digits and get them working correctly.

Thanks again!

I'm getting a usable display on the large digit now (MVI 4484 - YouTube).

A minor problem is that the display is about half intensity when the cathode is hooked to the 7404. I get full intensity if the cathode is plugged into Vcc. Not sure what that's all about.

Excellent work Phil!

Pretty sure I can guess why you are getting "reduced" brightness. That's actually normal for the 1:4 multiplex ratio you are using. The extra brightness you get connecting the common anode to +V is because with that connection you are actually no longer multiplexing! The display only looks ok because your sketch is displaying the same segment pattern on all 4 digits. If you change the sketch to display different patterns on the 4 digits and connect the common anode to +V, the display will be garbled. Connect the common cathode to the inverter output again and the display will be ok, but with reduced brightness.

It will be great to know that you/we have figured out how to get max7219 and this driver board to work together despite their incompatibility. However, the result at the end of the day will be quite complex, with the max7219, 2 x 7404 chips and the controller board. It would be simpler overall, as I suggested earlier, to abandon all those components and drive the displays directly with tpic6c595. This would also mean brighter displays (no multiplexing). If you decide to go that way, check the current requirements of the displays first. There are tpic6595 (250mA per segment), tpic6a595 (350mA), tpic6b595 (500mA) too, with even higher current capability than the tpic6c595 (150mA).

Hi Paul,

Just checking back after several very busy days assembling the prototype package for the “customer” to inspect tomorrow. This is actually a non-profit project. A friend of mine is paying for the parts to make a 3X6 foot scoreboard with 24 digits. I’m donating the labor.

The 5" digits work great – IF you’re looking at them straight on (i.e., perpendicular). Once you get more than 15 degrees off center, they pretty much disappear in daylight conditions. That’s a serious problem, and I don’t think it will fly. Based on preliminary tests, I was afraid that these digits would behave that way, but you can’t be sure until you’ve got a working demo. After tomorrow, it will likely be back to the drawing board.

I’ve searched the web and I’m unable to identify any other ultra-bright 7-segment displays in the 5" range. So I’m turning to matrix displays but there’s not much there either (in ultra-bright). Driving around town, you can see various LED matrices in traffic signals, gasoline (sorry, petrol) price signs, etc. Also used in stage lighting. They are plenty bright in daylight, but actually buying a sample seems to be another question.

Anyhow, I’m most grateful for your help. I really have learned a lot in the last 2 months!


PS: A few photos attached. You can see the fun I had with ribbon cable. The “3AB” is just a sample of the vinyl lettering that will be used on the tinted acrylic front sheet. An outdoor test earlier this evening showed that the digits can clearly be read from over 150 feet away in the dark.

Hi Phil, neat job. Well, from the front, anyway!

Before you give up on those displays, here's a drastic idea. Take an electric sander and grind down the hemispherical lenses on the leds to a rough flat surface. Don't go so far as to risk damaging the internals of the leds, and don't breathe in the dust! That should diffuse the light more.

Failing that, what about led strips? Good value for 5m reels, wide viewing angles (120~160°), up to 120 leds per metre, various colours available, can be cut into shorter lengths (in groups of 3 leds), backed with sticky tape. Cut them into strips to form 7 seg displays in whatever size you like, stick down on a board, wire them up as common anode and use a tpic6*595 to drive each digit.

A 5m reel should be enough to make 4 digits of around 12" high by 6" wide. Each segment would contain 18 or 21 leds and draw around 120 ~140mA @ 12V, a too much for tpic6c595 so maybe tpic6b595 instead to be safe.

For even larger digits, the tpic familly runs out of steam, so use plain old 74hc595 driving 7 logic-level power-FETs. Forum member Crossroads may already have something suitable.


Thanks for the additional ideas, Paul. I will keep them in mind. As I expected, the current prototype did not pass inspection due to the very limited viewing angle. Before sanding down the lenses on those digits, I might try it with some individual LEDs first.

Whatever kind of digit I use, or build, I need 24 of them. So at this point, I'm still looking for ready-to-use items. There are some interesting 16x32 matrices out there, advertised with viewing angles of 120 to 150 degrees, and supposedly visible outdoors in sunlight. For instance 6 inch or 4 inch

In fact, I just ordered the 6 inch (2 pieces). It comes with no accessories so I may be back here for further advice next week.