

The 74LS164 is an 8-bit serial-in, parallel-out shift register. It is designed to convert serial data into parallel data, making it a versatile component in digital electronics. The device features two serial data inputs (A and B) and eight parallel outputs (Q0 to Q7). It operates on a clock signal, shifting data through its internal registers on each clock pulse. The 74LS164 is widely used in applications such as data storage, data transfer, digital signal processing, and LED driving.








The following are the key technical details of the 74LS164:
| Parameter | Value |
|---|---|
| Supply Voltage (Vcc) | 4.75V to 5.25V |
| Input Voltage (VI) | 0V to 5.5V |
| High-Level Input Voltage | 2.0V (minimum) |
| Low-Level Input Voltage | 0.8V (maximum) |
| Maximum Clock Frequency | 25 MHz |
| Output Current (per pin) | 8 mA |
| Propagation Delay | 22 ns (typical) |
| Operating Temperature | 0°C to 70°C |
| Package Types | DIP-14, SOIC-14 |
The 74LS164 comes in a 14-pin package. The pinout and descriptions are as follows:
| Pin Number | Pin Name | Description |
|---|---|---|
| 1 | A | Serial Data Input A |
| 2 | B | Serial Data Input B |
| 3 | Q0 | Parallel Output Bit 0 |
| 4 | Q1 | Parallel Output Bit 1 |
| 5 | Q2 | Parallel Output Bit 2 |
| 6 | Q3 | Parallel Output Bit 3 |
| 7 | GND | Ground (0V) |
| 8 | Q4 | Parallel Output Bit 4 |
| 9 | Q5 | Parallel Output Bit 5 |
| 10 | Q6 | Parallel Output Bit 6 |
| 11 | Q7 | Parallel Output Bit 7 |
| 12 | CLK | Clock Input (Rising Edge Triggered) |
| 13 | CLR | Asynchronous Clear (Active Low) |
| 14 | Vcc | Positive Supply Voltage |
The following example demonstrates how to use the 74LS164 to drive an 8-LED array with an Arduino UNO.
// Define pin connections
const int dataPin = 9; // Serial data input (A)
const int clockPin = 8; // Clock input (CLK)
const int clearPin = 10; // Clear input (CLR)
// Function to send a byte of data to the 74LS164
void shiftOutData(byte data) {
for (int i = 0; i < 8; i++) {
// Send each bit (MSB first)
digitalWrite(dataPin, (data & (1 << (7 - i))) ? HIGH : LOW);
digitalWrite(clockPin, HIGH); // Pulse the clock
delayMicroseconds(10); // Short delay for stability
digitalWrite(clockPin, LOW);
}
}
void setup() {
// Set pin modes
pinMode(dataPin, OUTPUT);
pinMode(clockPin, OUTPUT);
pinMode(clearPin, OUTPUT);
// Initialize the 74LS164
digitalWrite(clearPin, HIGH); // Keep CLR HIGH for normal operation
digitalWrite(clockPin, LOW); // Initialize clock to LOW
}
void loop() {
// Example: Light up LEDs in a binary counting pattern
for (byte i = 0; i < 256; i++) {
shiftOutData(i); // Send data to the 74LS164
delay(500); // Wait for 500ms
}
}
Outputs Not Changing:
Flickering Outputs:
No Output on Q Pins:
Q: Can I cascade multiple 74LS164 ICs for more outputs?
A: Yes, you can cascade multiple 74LS164 ICs by connecting the Q7 output of one IC to the serial data input (A or B) of the next IC.
Q: What happens if both A and B inputs are LOW?
A: If both A and B are LOW, no data will be shifted into the register, and the outputs will remain unchanged.
Q: Can the 74LS164 drive high-power loads directly?
A: No, the 74LS164 cannot drive high-power loads directly. Use external transistors or drivers for such applications.