I am sorry I did not understand what you are trying to say here I would be grateful if you can elaborate.
The 74HC595, a serial in/parallel out shift register can be employed to increase the number of available output pins for a project such as yours.
In fact several 74HC595 can be easily cascaded by connecting the QH line of the first 74HC595 to the SER of the second 74HC595, and so on.
Using this technique several 74HC595 can be cascaded while only requiring
three lines from the microcontroller.
The 74HC595 is equipped with a storage register and 3-state outputs, the storage register is controller by Register Clock (RCLK) or Storage Register Clock Input (SCTP) line, depending on the manufacturer.
While a new state value is being shifted into the device the RCLK/SCTP is held low, once the new state value is in position the RCLK/SCTP line is pulled high storing the new value state with the storage register.
The Master Reset (MR) or Storage Register Clear (SRCLR) line, once again depending on the manufacturer, can also be utilized to initialization the device into a known cleared state.
The following tutorial demonstrates many of the features of the 74HC595, although the tutorial employs an Arduino, the techniques can be easily ported to any microcontroller.
Can you move over? The 74HC595 8 bit shift register
A AVR centric tutorial controlling 16 LEDs using only three pins of a ATmega8:
Introduction to 74HC595 shift register – Controlling 16 LEDs
There are numerous threads in the forum concerning this topic, just search for 74HC595.
Questions bout shiftregisters (74HC575, 74HC597)
TI SN54HC595/SN74HC595 Datasheet
BigDog