Recently I saw the LOL Shield .. an Arduino Shield with lots of LEDs. This shield uses chalieplexing, a technique which allows you to drive a big LED matrix with a small number of I/O pins. If you’re wondering how does it work, here’s the key concept: tri-state logic.
I this image, you have an example for 6 LEDs. This works by tristating a pin before applying voltage to the other two pins.
This technique allows you make a big economy of I/O pins, but it comes at the cost of inreased algorithm complexity. Anyway, usually it’s a good idea to use a separate controller in order to drive the LEDs and to interface the LED matrix with the main board using a serial protocol, like I2C.
You can read more about the LOL Shield and charlieplexing here:
http://jimmieprodgers.com/2009/12/my-development-process/
http://jimmieprodgers.com/2009/12/my-development-process-part-2/