The standard solution is to use a MAX7219 or two shift registers, one driving the segments and the other driving the digits. You need a NPN transistor such as the 2N2222 per digit to pull the cathode digits to ground for active digits. The per pin current rating of a 74HC595 is too low, hence the transistors. You can skip the transistors if you use a high power shift register such as the TPIC6B595 that has FETs driving the outputs.
This schematic shows a MCU and NPN transistors driving a display. The MCU is driving the digits, but you can as easily use another 595 daisy chained to the first shift register (saving you pins on the MCU):
Hope this helps!
Yes that helps alot! Thanks!
Wait on, you have a few things wrong there!
First, as I explained, the performance of your arrangement of shift registers and transistors is going to be inferior to the MAX7219 unless you include both anode and cathode drive transistors - a total of 12 for 4 digits.
Secondly, you have argued against yourself if you talk of "board size constraints" because a MAX7219 is one IC (to drive anything up to eight digits) and one resistor against multiple ICs, 12 transistors and 16 resistors. Or a few less transistors and resistors if you use a TPIC6B595 but still get inferior performance.
With the increased board size goes increased assembly costs.
Now I also wonder whether you are comparing "apples with apples" when you obtain all those parts from the same supplier as you would, the MAX7219. While there are some dodgy supplies, I have one or two dozen of the cheap eBay MAX7219s here and while I have not tested them all yet, I have yet to find any faulty so far.
And - rather amusingly, you mentioned a 74LS125 - an obsolete logic family!
(OK, you meant 74HC125 ;D )
Your right about that. I hadn't even considered that. Wow those chips are crazy cheap on Ebay I'm gonna pick up a few and see how it goes. Thanks!
Actually, NO you don't. If you pull the cathodes of the inactive digits HIGH, all of those segments will be extinguished.
That's what I was about to say. If you've got +5V on either end of an LED it's not going to light at all. The pins you set to LOW will be grounds and that light will light up, but if you set the pins where the cathodes are going HIGH they will turn off the lights. You don't need a high impedance pin anywhere to do what you want to do.
I know because I have built tens of 4 digit displays and every one of them has a pair of shift registers to control everything. It works great. One shift register for the individual bits, and a second one for the 4 cathodes. It leaves 4 pins out on that second shifter so I often use those for driving another LED or two if I need them for indicators or something.
I didn't think that was possible but it seems so obvious now. Thanks guys.