Picture of Charlieplexing 7-segment displays
I have been experimenting using the Arduino to drive a seven-segment display (SSD). When ganging several together to form a multi-digit display, a common design is to wire a matrix and use multiplexing to reduce the number of control pins. The typical formula to determine the required number of pins is one for each segment LED plus one for each SSD. Thus, a four-digit display would require twelve pins - eight segment select lines (including the decimal point LED) and four SSD select lines.

Recently, I learned of a multiplexing technique called charlieplexing. The term applies to managing a matrix of LEDs with fewer control pins than the obvious approach. Charlieplexing is most advantageous in situations where each anode and cathode can be separately connected into the matrix. Unfortunately, SSDs are manufactured with either all the segment anodes or cathodes in common. Even with this interconnect constraint, it's still possible to control SSDs with fewer than the obvious number of pins using an arrangement that timeshares the use of the segment and SSD selects. Thus, from one to eight SSDs can be controlled with only nine pins. Obviously, the more SSDs in the display, the greater the charlieplexing advantage. In this test case using four SSDs, the savings are only three pins - but that's enough for a demonstration.

I couldn't find an online example that used the inexpensive SSD available from Radio Shack and the programs accompanying the examples I did find were too large and slow for what was being accomplished. The entire Arduino was being monopolized just driving the display! Acceptable as a demo but unusable for any purpose more complicated than an expensive digital clock. I thought it should be possible to have the display as an adjunct to a sketch with a different primary purpose. I constructed this as a proof of concept and thought it might help someone else if I published it.

Charlieplexing is actually exceptionally easy to accomplish with the Arduino. This demo sketch is less than 2K and leaves plenty of processor time for my main project.
another thing you could do to give the arduino a break is to get a dedicated ssd driver:
these are a bit pricey, but work really well.