The LED cube 4x4x4 has the atmega32 controller and uses POV multiplexing to switch the 64 LEDS. A total of 16 transistors are used to switch on the Led columns and then another total of 4 lines to switch on or off the ground layer. So a total of 16+4 = 20 lines are needed to make the LED cube 4x4x4 work. It is important that the 4 ground layers are switched between them to switch one layer at a time and the switch the desired led’s on the particular layer.
Led Cube 4x4x4 – [Link]