LED Piano: Using Shift Registers

Shift Registers 1 Shift Registers 2

(Note from instructor: the LED Piano project was a great example of using shift register chips to get more digital outputs!)

General Operation

The SN74HC595 is a serial to parallel 8-bit shift register. The function of this IC is to receive a serial bite of data and output the sequential data to 8 different pins. This allows for the user to control multiple outputs with only 3 pins: the serial input (SER), clock pin (SRCLK), and latch pin (RCLK). The clock pin enables action of the shift register depending on its state. Once the clock pin transitions to a low, we are able to input data. The serial input receives the bite of data from the Arduino and places it in the SN74HC595 storage register. Once all data is inputted into the shift register the latch pin is toggled to high, which transfers the serial data in the storage register to the eight output pins. The Output Enable pin (OE) needs to be set to a logic LOW for the data to be transferred to the outputs. Once the Serial Clear pin (SRCLR) receives a logic LOW, it erases the data from the outputs. So, in order for it to operate, we leave Serial Clear with a logic HIGH.


The SN74HC595 can be daisy chained multiple times to produce infinite outputs, while still only using the three pins. In order to do this, we need to connect the clock pins together and the latch pins together. For the data to be transferred to each cascading pin, we need to connect the QH’ output pin to the serial input pin of the next IC. In doing this, it allows us to clock in eight additional outputs. Once we clock in the whole combination, we can do the same process as in the General Operation to latch the outputs to the corresponding IC pins.