MAX7219 and common anode

Hi, I'm planning to buy some of these 4 7-segments I've found: I want to control them with a MAX7219 (I have some). The problem is that the displays are common anode, while the MAX7219 is supposed to work with common catode devices. I've thought about two possible solutions and I wish to know if there was any problem with them (my electronic theory is poor...). 1- Use of inverters at the digit pins. If I wire the digit pins to the digit pins of the displays throwgh inverters and I connect the segments pins in the usual way when I send a 0 the led will light and viceversa. So with the arduino I can easily invert the data send to the MAX7219. (Of course, I could use inverters for the segments too). 2- Connecting digits to segments an segments to digits. If I connect the pins of the MAX digits to the display segments and viceversa I'll maintain the right polarity. In that case when the MAX selects a digit, in my display it is actually selecting a concrete segment in every digit. So the transformation that I have to do in the Arduino is more complex, but I suppose it's possible.

I hope you can understand my poor english. So, do you think both solutions are correct? Will I have any problem? Wich one do you considere the best? Thanks in advance.

I think MAX7219 can source and sink current for each segment it drives (I just scanned through the product documentation), but it seems that the source and sink capabilities are a little different. Nevertheless, I think it should be fine with the display you have.

Regarding the options you mentioned, I don't think the first one (add an inverter) would work. The direction of the current flow would be different between common anode and common cathode. You will need to invert the drive signal regardless (since you are sinking current instead of sourcing current).

the MAX7219 (or MAX7221) simply doesn’t work with common anode displays.

The Phillips SAA1064 4-digit LED-driver uses common anode Leds, but it uses the I2C-Bus (TWI).

But if you don’t mind spending some more money I would currently buy this one here
Should be very easy to control with the SoftSerial lib .


Well, the problem is that I want 6 modules. So the difference in price is important. And with the MAX I can use the same 3 pins to control all the chips in a daisy chain configuration. With this serial interface I need a pin for every module (right?).

Hi, looking at the sparkfun pricelist is says 7219 $9.95 7-Seg $1.95

+ some etxra stuff (2 capacitors, 1 resistor, pcb)

compare this to serial-module price ($12.95) the module is actually cheaper (unless you already have all the components).

For the serial-connection you need 1 pin for each module. This should be very easy to code.

With a bit more coding you could implement the SPI-mode of the module and daisy chain them just like you would do with the MAX7219.

If you don't need more than 4 digits on each module I think the sparkfun serial-module is the better alternative. [edit] Not to forget that the 7219 doesn't work with you displays [/edit]

The Phillips IC would be connected to the IIC bus so it needs 2 wires for all of the modules. They are really cheap $1.81 at mouser but you cannot connect more then 4 of them to the arduino board.


Hi again, thanks for the info. Just to clarify that with 1 7219 you control 2 modules, so it's cheaper (and I already have them...). But you've given me the idea to look up at mouser. I think I'll find an equivalent product with commont cathode. Thanks!

Allegro a6278 for common anode $1.86 at digikey


Finally I've found a good solution and it works ok. It's the use of an ICM7218a. With one of these chips I can control 8 digits (2 modules from Sparkfun). I've written a post including sample code:

I have been reading this topic with interest.

Basically, I am interested in making a 4 digit 7-segment display in which the output will be duplicated 6 times (eg. there will be 7 'units' each showing the exact same thing. I was going to use the MAX7219 for this, but the Sparkfun link that was provided looks interesting. Would anybody be able to tell me if they think this would be possible, and how I would go about daisy-chaining these devices? Sorry if this is a vague question, I am a bit new to all of this!

I haven't tested it, but I think you could simply put 7 ICM's and wire all of them to the same Arduino pins. I mean, 1 arduino, 7 ICM7218 and 7 displays. The communication is unidirectional, from the Arduino to the ICM, so I can't see a reason of failure (maybe the Arduino is not able to source enough current, but I don't think the ICM sink too much). If this don't work, you can put in the middle some PCF8574 and use the I2C bus. I'm preparing another post about this topic.

The post is ready. With this architecture you can achieve your goal, as long as you can plug up to 8 PCF8574 in the same I2C bus.