Here’s an interesting article about reading data from shift registers using less than three pins. 74HC165 shift registers are a popular choice for adding inputs to a microcontroller. They have a ...
Eight-pin microcontrollers offer numerous peripheral features. However, the maximum number of I/O pins available is often limited to six, since two pins would be required for the chip's power supply.