74HC164 cascade

74HC164 – 8 Bit Serial In / Parallel Out

Cascading two  74HC164 to drive two 7-Segment displays


In this tutorial I show you, how you can cascade the 74HC164 to drive more displays.

The 74HC164 is an 8 Bit Serial In / Parallel Out circuit. 8 bit are for one display. For the next display we need also 8 bit. To realise this, we connect the Q7 pin from the first 74HC164 with the data input of the second 74HC164. So we can send two 8 bits, one for the first display, the other for the second display.

Look at the short circuit:

74HC164 cascade


And here is the full circuit:

74HC164 cascade fritzing


I use 7-Segment displays from kingbright. In this tutorial the type SC56. This display has a common cathode. Pin 3 and 8 are the common cathode. As a series resistor I use 470 Ohm for each pin.

Here is the correct wiring diagram (74HC164 and 7-Segment display):
Q0 – Pin 7 of the display
Q1 – Pin 6 of the display
Q2 – Pin 4 of the display
Q3 – Pin 2 of the display
Q4 – Pin 1 of the display
Q5 – Pin 9 of the display
Q6 – Pin 10 of the display
Q7 – (Pin 5) empty, not in use (this bit is responsible for the dot and I don’t use the dot)

You can use each other assignment between Output Pins of the 74HC164 and the display. But than, you need other values in the array to display the correct digits.


Some Details:

2014-08-01 18.23.50 2014-08-01 18.03.19 2014-08-01 17.56.52



The code:

int data = 2;
int clock = 3;

void setup() {

// digit 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
byte z[]={B00111111,B10000110,B1011011,

void loop() {
  for (byte a=0;a<10;a++)
    for (byte i=0;i<10;i++) {
      shiftOut(data, clock, MSBFIRST, z[i]);
      shiftOut(data, clock, MSBFIRST, z[a]);

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s