Shift Register Sample

Story

In this sample, we’ll connect an 8-bit serial-in, parallel-out shift register to your Raspberry Pi 2 and create a simple app that uses the shift register to control eight LEDs.

This is a headed sample, so please ensure that your device is in headed mode by running this command: setbootoption.exe headed (changing the headed/headless state will require a reboot).shift register sample

Connect the Shift Register to Your Device

You will need the following components :

Let’s start by wiring up the components on the breadboard as shown in the diagram below.

Note: Make sure to power off the RPi2 when connecting your circuit. This is good practice to reduce the chance of an accidental short circuit during construction.

schematic shift register sample

Connecting the 74HC595N Shift Register

Place the Shift Register on your breadboard such that it straddles the center gap of the breadboard.

Locate pin 1 of the 74HC595N shift register by finding the notch on the IC. If you orient the IC so that the end with the notch is facing left, pin 1 will be the first pin in the lower left below the notch.

Scroll to Top