Inverting a source?

I am sure this has been posted before but I could not find it.

I have noticed a lot of the LED controller IC's require a common cathode LED matrix. I only have common anode matrices and it appears most of the ones you can purchase are also common anode.

So.....

If I have an IC that controls a common cathode Matrix, is there a way I can invert the source so that it can run a common anode display instead? if so, how?

Thanks,

Mike

I think the short answer is "no, you can't convert a common-cathode chip to work with common anode displays". You'd be reversing the direction of current flow, and what with semiconductors being rather diode-like, that's not likely to work. I've seen both common anode and common cathode LED matrix units for sale, at Farnell for instance.

There must be some IC out there that could take an input and output the opposite.

Farnell have no LED matrix units at all. All they have listed says "no longer in stock. Product discontinued"

Like this: Inverter (logic gate) - Wikipedia ?

Well looking at the datasheet it seems to fit the bill! Thanks.

Simple logic gates probably won't have the current capabilities required by the common cathode/anode of a matrix LED driver. The driver will need something like 8x20mA to handle all common connection for a row of 8 LEDs, and that's a LOT more than the average logic gate is capable of.

An inverter chip (such as the 7404) won't do the job that you asked about, that is, making a common-cathode matrix work with a common-anode chip, or vice versa.

Farnell have lots of LED matrix displays: 1168663, 1168664, 1168665, 1168667, all made by Kingbright:

Anachrocomputer, what search did you use to find these?

I searched for 'Matrix', then in 'Displays', '7-segment and dot matrix', it gave a set of criteria. One of the criteria was for "number of characters", none of the criteria had anything to do with matrix. If I just showed all KINGBRIGHT parts, they were all 7-segments, no matrices.

Update: I didn't see all the way on the right edge, it shows Pages 1 2 3 4. But even on all four pages there, they're almost all 7-segments. Finally, I found a few discontinued items, and a few 5x8 matrix parts.

I searched for "led matrix", then went to 'Displays', then 'LED Alphanumeric'. Even though a dot-matrix LED is hardly alphanumeric! Hmmm, having looked again, I can see only 5x7 types. Hang on... (rustles through paper catalogue...) searches again... Oh dear, the only 8x8 types are indeed discontinued. I was looking at 5x7 types, which are clearly not what you need, although I used a pair of them to make 10x7:

Imgur

Most large component supplier web sites are dreadful for searching! One of my frustrations is something like searching for a LED, and getting "30000 matches; showing 1-25". What's the use of that, working through thousands of parts, one screenfull at a time! Then there's the terrible state of the units used for matching (sometimes pF, sometimes nF, sometimes uF) and the total lack of 'numerical value' searching (0.1uF doesn't match 0.10uF, let alone 100nF). In the case of the LEDs, the problem is with colour; there's "red", "ultra red", "HE red", "high efficiency red" and so on, all non-matching. It's like a bunch of idiots put the database together!

Oh dear, I'd better stop ranting now...

Mouser and digikey have nice parametric search engines, useful for narrowing down to a maufacturers part number even if you end up buying the parts elsewhere.

"30000 matches; showing 1-25"

A good trick with the Farnell site when it says this is to click on the top of the price column and get it sorted by price, either up or down. That cuts out a lot of the very expensive stuff that you would not consider.

An inverter chip (such as the 7404) won't do the job that you asked about, that is, making a common-cathode matrix work with a common-anode chip, or vice versa.

Why not?

Why not?

Because an inverter flips the voltage level, it doesn't turn the current around and send it the other way.

-j

Because an inverter flips the voltage level

Exactly, an inverter changes TRUE into FALSE and vice versa, that is it takes a 0V or 5V input and makes 5V or 0V at the output.

If that was sufficient, you could simply make the change in software! Just swap TRUE and FALSE in the code.

If you want to make a common-anode driver chip drive a common-cathode LED (which is what I understand you want to do), you need to take a driver pin that is designed to "sink" current, and make it "source" current. Now, you'll often find "source" and "sink" used that way in chip data sheets; what it means is that a pin can only conduct current in one direction. A "sink" can conduct from pin to ground, while a "source" can only conduct from Vcc (5V) to the pin.

A normal "logic" inverter will either source or sink current, while a driver output will typically only do one or the other. The inverter will source (some) current when the output voltage is high, and sink (some) current when the output voltage is low. So the inverter DOES do what you want for converting the drivers (possibly requiring pull-up/down resistors, and certainly requiring inverters of some kind on both row and column sides of the matrix), at least in theory. See my previous message about the AMOUNT of current being generally insufficient.

All in all, it OUGHT to be easier to find match LEDs and driver chips. Highly integrated drivers are going to prefer common-cathode configurations because high-power current sinks are somewhat easier to make that current soucres (at the chip/transistor level), but LED vendors certainly aren't blind to that fact...

OK Thanks. I think I understand it a lot better now.

Reason i wanted to do it is most of the LED Matrices i've seen for sale tend to be common ANODE and certainly the only RGB LED MAtrix i've seen that isn't a laughably expensive price has been common anode too and I have a load of those. I was hoping I could get my common cathode drivers (MAXxxxx and the AS1107) to run the common anode matrix somehow.

Can it now be done with the use of transistors?

Yes, you could use transistors. But you'd need one transistor per LED, which rather misses the point of using a driver chip. Also, some driver chips (I don't know if this applies to your ones) have a built-in constant current circuit, usually programmable by a single resistor. If you add driver transistors, you'd lose that constant current ability.

It's really going to be much easier to use the right driver chip to suit the LEDs you have!

OK i think you are right. Seems like too much work. I was just wondering if it could be done easily, but obviously not. I have shift registers (which will control either an common anode or cathode matrix), plus some TLC5940's and an AS1107 (looks interesting but haven't tried it yet and there is no code in the public domain for it so will have to start from scratch)