Skip to content

 

Understanding 74HC164: Practical Guide to 8-Bit Serial-In Parallel-Out Shift Register

The 74HC164 is an 8-bit serial-in, parallel-out shift register that allows you to expand microcontroller outputs using minimal pins. This guide covers the 74HC164 pinout, working principle, applications, and interfacing methods in detail. With a clear explanation of its internal logic, timing diagrams, and a real-world circuit example, this article is perfect for electronics engineers and hobbyists. You’ll also find a step-by-step tutorial on connecting the 74HC164 to an Arduino to drive multiple LEDs.

A full bill of materials (BOM), schematic explanation, and frequently asked questions are included for quick reference. By the end of this guide, you’ll have a complete understanding of how to use the 74HC164 effectively in your own projects. Whether you’re designing embedded systems or experimenting with digital electronics, the 74HC164 can help simplify wiring and optimize I/O usage in microcontroller-based applications.


1. Introduction 

When you’re building digital projects, sometimes the number of microcontroller pins just isn’t enough. This is where 74HC164, an 8-bit serial-in parallel-out shift register, becomes incredibly handy. It takes data in serially (one bit at a time) and outputs it in parallel, effectively multiplying your available output pins.

It’s especially useful when driving LEDs, displays, or any set of digital outputs without overloading the microcontroller’s limited I/O capacity.


2. Features 

  • 8-bit serial-in parallel-out shift register

  • High-speed CMOS technology

  • Direct, clear input for resetting outputs

  • Wide supply voltage range (2V to 6V)

  • Outputs capable of driving TTL and CMOS loads

  • Low power consumption Understanding

  • Simple interfacing with microcontrollers


3. 74HC164 Pinout and Functions

74HC164 Pinout

Pin No.NameDescription
1ASerial data input A
2BSerial data input B
3QAOutput Q0
4QBOutput Q1
5QCOutput Q2
6QDOutput Q3
7GNDGround
8QEOutput Q4
9QFOutput Q5
10QGOutput Q6
11QHOutput Q7
12MRMaster Reset (active low)
13CPClock input
14VCCSupply voltage
15NCNot connected
16NCNot connected

4. How 74HC164 Works

The 74HC164 takes two serial data inputs (A and B) and combines them via an internal OR gate. Data is shifted into the register on each rising edge of the clock signal (CP). As bits shift in, the outputs (QA–QH) change, providing parallel outputs for each bit.

Master Reset (MR) clears all outputs to LOW when activated (logic 0).

This mechanism allows microcontrollers to send a stream of bits serially and then instantly have all outputs updated in parallel.


5. Circuit Diagram Explanation

In the example circuit:

  • Microcontroller Pins: Two pins are used—one for clock (CP) and one for data (A/B tied together).

  • Outputs: Each of the eight outputs drives an LED through a current-limiting resistor.

  • Power Supply: The 74HC164 is powered from the same supply as the microcontroller (5V for Arduino or 3.3V for some boards).

When data is sent bit-by-bit, each clock pulse shifts it along the register, lighting the LEDs in sequence.

Download Circuit Diagram74HC164 Practical Guide


Materials for the Project 

S.NoComponentQuantityDescription
174HC164 IC18-bit serial-in parallel-out shift register
2Arduino Uno1Microcontroller board for control
3LEDs8Output indicators
4Resistors8220Ω current limiting
5Breadboard1Prototyping
6Jumper wiresAs neededConnections
7USB Cable1Power and programming

7. Step-by-Step Guide 

Step 1: Connect VCC (pin 14) to 5V and GND (pin 7) to ground.
Step 2: Connect Arduino pin D2 to 74HC164’s CP (pin 13).
Step 3: Connect Arduino pin D3 to A and B inputs (pins 1 and 2).
Step 4: Tie MR (pin 12) HIGH to enable outputs.
Step 5: Connect outputs QA–QH (pins 3–6, 8–11) to LEDs via resistors.
Step 6: Upload Arduino code that sends serial bits to control outputs.


8. Arduino Example Code

int dataPin = 3;
int clockPin = 2;void setup() {
pinMode(dataPin, OUTPUT);
pinMode(clockPin, OUTPUT);
}

void loop() {
for (int i = 0; i < 256; i++) {
shiftOut(dataPin, clockPin, MSBFIRST, i);
delay(200);
}
}


 

9. Applications 

  • Driving multiple LEDs

  • Expanding microcontroller outputs

  • Controlling 7-segment displays

  • Building binary counters

  • Interfacing with sensors requiring parallel readout


10. FAQs

Q1: Can I cascade multiple 74HC164 ICs?
A: Yes, connect QH of one IC to the data input of the next.

Q2: What’s the maximum clock frequency?
A: Typically around 25 MHz at 5V supply.

Q3: Is it compatible with 3.3V logic?
A: Yes, but check the datasheet for exact voltage levels.

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *