Electronic – Driving 7 segment displays through Raspberry Pi’s GPIO

7segmentdisplaygpiomultiplexerraspberry pitransistors

So I was thinking of wiring up four 7-Segment displays through the Raspberry PI.
I'd do that by multiplexing each of them, and came across this:
http://hackyourmind.org/public/images/display7seg_anim.gif

The thing is, I'm aware that I can draw (and sink) a max of 16 mA per GPIO pin. Therefore I can only have a max draw of 16mA for each segment correct? (assuming I don't use a transistor for each segment to draw power from the 5v rail).
So, if I'm only drawing less than 16mA at any given time, do I need those transistors to switch the multiple displays on and off? Can't I wire each of the common anodes/cathodes directly from the GPIO pins and just switch them high and low to turn them on and off?

EDIT: I'm also pulsing each of the segments of each display so I don't need 7 resistors per diplay and can get along with just using one resistor on the common anode/cathode and keep the brightness across different digits (is there a better way to do this?)

Best Answer

If you pulse each segment of each display (at each moment in time only one segment of each digit is on) you indeed don't need any transistors, and you can use a single resistor per digit.

The downside is that the average brightness of each digit will be only 1/8 of its 'full' brightness. If you use a high-brightness display this will likely be no problem. (note that in the gif you linked to the brightness is 1/4 of the maximum, because only one digit is activated at each moment in time).