Raspberry Pi I/O capabilities can be expanded by adding one or cascading a number of shift registers. In this design 74HC595 example is shown. 74HC595 is a very popular and relatively cheap IC. There are assembled modules
As can be seen from attached Python code example a desired bit value is sent to SDI and clocked out by SRCLK. After 8 of these pulses a byte of information was sent. Now we’ll need to toggle RCLK once to lock the shifted data and we are done. In order to make it more interesting I’ve added a simple LED pattern array to create a running LED effect as shown in a short video.