Common anode 7 segment driving

Steve2381

Senior Member
Hi all. Not done a project for a while, so time for some late nights...

Digging around the workshop I found a huge pile of very nice common anode :eek: quad 7 segment displays.

I had a quick go at wiring and programming a multiplexing circuit to control one of these (40x2)... but it wasn't all that successful. I just could not get a decent refresh rate across 4 digits and the display was constantly dim.
I am sure my terrible code could be improved upon, but by the time I add in all the other parts of my clock project (hence the 40x2) it just isn't going to work.

I have used a Max7219 for a common cathode clock before.... any suggestions for a common anode?
Apparently I can use a Max7219 to run a common anode display, but it loses some functionality and is a bit of a pain to program.

The other option is to use 4x 74HC595 shift registers, but then my component count and wiring starts to mount.... oh, and I don't have any!

Just wondered if anyone had any other IC suggestions
Cheers
 

AllyCat

Senior Member
Hi Steve,

If you've "found" them, perhaps they're quite old and inefficient?

IMHO you should wire just one or two segments through a resistor to a power supply to find out what current you need so that they are not "dim". Measure the voltage across the LED and then (as you have plenty) try increasing the current 4 times (i.e. as would be used if multiplexed) for a short time and measure the voltage drop again.

Those measurements should give you (or us) an indication of what power supply voltage/current will be required and whether using multiplexed drivers, etc., is realistic. Then you can consider what the code might need to look like.

Cheers, Alan.
 

Steve2381

Senior Member
Thanks for the suggestions... another evening of playing with the original multiplexing idea I think. I didn't get much when I searched.... possibly because I looked for Common Anode ideas.
I am running on 12v with 220R resistors.. my usual setup for LED displays. Tweek that about I think to see what I can achieve.
The displays are probably only a few years old... not much in the way of specs however. Seem to remember I picked them up in an Ebay sale of a big pile of components. I have about 50 of these new red quad displays and I think I paid about £10.
I will have a look at the code in the link that Marks has provided.
Thanks
 

hippy

Technical Support
Staff member
I am sure my terrible code could be improved upon, but by the time I add in all the other parts of my clock project (hence the 40x2) it just isn't going to work.
It is probably premature to say that. It should be entirely possible to multiplex four digits without flicker and with satisfactory brightness.
 

Steve2381

Senior Member
Hi all. Just got back from weekend away. Been playing around to see what I can achieve.
Setfreq to em64? No, I didn't try that.

SAA1064. Looks like a good solution but they ain't cheap. Will make my project pretty expensive.

I thought the Max7221 and the Max7219 where the same - common Cathode

I will rewrite the code, set the freq and see where that goes. My only concern is the amount of code I will need in the main loop (keypad monitor, mp3 module control etc) .... might slow it all down a bit too much for multiplexing, but there is only one way to find out.
 

John West

Senior Member
You're correct, Steve. I didn't recall correctly, so I just looked it up. And a quick web search doesn't indicate that Maxim makes a similar common anode device.
 

hippy

Technical Support
Staff member
a quick web search doesn't indicate that Maxim makes a similar common anode device.
As Steve2381 noted, the MAX7219 and MAX7221 can both control common anode displays but some of the features designed into those for using common cathode 7-seg displays won't be applicable and assembling the data bytes sent to represent the program data will be a little more complicated.

Both MAX7219 and MAX7221 can drive 64 LED's in a matrix and such a matrix can be considered common cathode and/or common anode.
 

Steve2381

Senior Member
Thanks for all the advice.
I printed off the 6 digit clock link code posted earlier in the thread and promptly got totally lost in how it actually works.
Way out of my comfort zone for programming. I will have to de-construct the code, remove the temperature part and see where I go from there.
Not sure how the read/write/eeprom is set up and I always have issues using the timer function.

You guys are way more efficient at coding than me (hence the reason your code probably works for multiplexing and mine doesn't).

Some long evenings ahead.

Yes... I can code the Max7219 to run common anode, but its not particularly easy I seem to remember.. I think this approach may be better.
 
Last edited:

Hemi345

Senior Member
SAA1064. Looks like a good solution but they ain't cheap. Will make my project pretty expensive.
Hmm, it must be discontinued. It was only about $2US when I bought a couple which made it very attractive compared to Maxim's offerings.
 

Hydroid

Senior Member
Hmm, it must be discontinued. It was only about $2US when I bought a couple which made it very attractive compared to Maxim's offerings.
I bought a few SAA1064's from DigiKey recently, but they now show zero stock - as does Mouser. Although they don't say how many they have, Futurlec shows them in stock for $3.20US....
 
Top