If you previously worked(or currently working) with small 8-bit microcontrollers, like ATTiny or PIC12, you’ve probably encountered a fundamental problem of not having enough GPIO pins for your needs or project requirements.
Upgrading to a larger MCU is only one of the options, but as usual there is an alternative. In this article I will explain how to use shift registers in some common situations in order to expand the I/O capacity of your microcontroller. As an example I will use an ATTiny13A and a 74HC595 shift register.
For more detail:Getting more I/O pins on ATTiny with Shift Registers