กลับไปหน้ารวมไฟล์
shift-register-7segment-en.md

Pin Efficiency: The 74HC595 Shift Register

If you connect a single 7-segment display to an Arduino, you use 7 digital pins. If you want to connect two displays, you need 14 pins! You quickly run out of room. The 74HC595 Shift Register is the magical IC that solves this problem.

invisible_mess_glasses_relay_schema_1772681179521.png

Serial to Parallel Conversion

The Shift Register acts as an expander:

  1. The Data Line: The Arduino sends a string of 8 bits (e.g., 11001100 representing the LED pattern) through a single wire (Serial Data).
  2. The Clock Line: A second wire acts as a metronome, telling the chip when the next bit is arriving.
  3. The Latch Line: Once all 8 bits are inside the chip, the Arduino sends a "Latch" signal. The chip takes those 8 bits and instantly pushes them out to its 8 physical output pins (Parallel).

By doing this, you control 8 outputs using only 3 Arduino pins!

Components

  • Arduino Uno/Nano.
  • 74HC595 Shift Register IC.
  • Common Anode/Cathode 7-Segment Display.
  • Current Limiting Resistors (x8).

Daisy Chaining

The best part about Shift Registers is that they can be "daisy-chained." The overflow of the first chip connects to the input of the second. This means you can control two displays (16 LEDs), or three displays (24 LEDs), and it still only uses the exact same 3 pins on your Arduino. It is a mandatory concept for building large LED cubes or scoreboards.

ข้อมูล Frontmatter ดั้งเดิม

title: "Seven-segment display with a 74HC595"
description: "Expand your pins! Learn how to use a Shift Register to control a 7-segment display using only 3 Arduino pins instead of 7."
category: "Screens & Displays"
difficulty: "Intermediate"