Parts

74HC595 shift register: pinout, timing, eight LEDs from three pins and daisy-chaining

By

The 74HC595 is a 16-pin shift register with an output latch. Pin 14 (SER) takes the data, pin 11 (SRCLK) clocks it in and pin 12 (RCLK) copies it to the outputs. The eight outputs are QA on pin 15 and QB to QH on pins 1 to 7. Pin 8 is ground, pin 16 is VCC, pin 13 (OE) must be low for the outputs to drive, pin 10 (SRCLR) must be high, and pin 9 (QH') passes the data on to a second chip.

The page covers the two naming schemes makers use, the timing, the current limits that decide how many LEDs it can drive, a worked eight-LED circuit on 5 V and chaining chips for 16 or more outputs. The figures come from Texas Instruments' SN74HC595 sheet and Diodes Incorporated's 74HC595 sheet; where they differ, both are shown.

Datasheet: Texas Instruments SNx4HC595 8-Bit Shift Registers With 3-State Output Registers (SCLS041J) (PDF)Ask Datasheet Guru about the 74HC595D

Advertisement

Pinout by package

SN74HC595N DIP-16 · TI1=QB 2=QC 3=QD 4=QE 5=QF 6=QG 7=QH 8=GND 9=QH' 10=SRCLR 11=SRCLK 12=RCLK 13=OE 14=SER 15=QA 16=VCC
top view, notch upSN74HC595N116QBVCC215QCQA314QDSER413QEOE512QFRCLK611QGSRCLK710QHSRCLR89GNDQH'

Top view, notch up: pin 1 (QB) is top left; QA is on pin 15, across from QB, not on pin 1.

The SOIC (SN74HC595D) and TSSOP (PW) versions use the same pin numbers.

Source: Texas Instruments SNx4HC595 8-Bit Shift Registers With 3-State Output Registers (SCLS041J), p. 3 (Section 5, D, N, NS, J, DB or PW package top view, and Table 5-1 pin functions); Texas Instruments SNx4HC595 8-Bit Shift Registers With 3-State Output Registers (SCLS041J), p. 1 (Device information: SN74HC595N, PDIP (16), 19.31 mm × 6.35 mm); Texas Instruments SNx4HC595 8-Bit Shift Registers With 3-State Output Registers (SCLS041J), p. 18 (package option addendum (PDF page 18): SN74HC595N, PDIP (N) 16 pins, −40 to 85 °C)

74HC595S16 SOP-16 · Diodes Inc.1=Q1 2=Q2 3=Q3 4=Q4 5=Q5 6=Q6 7=Q7 8=GND 9=Q7S 10=MR 11=SHCP 12=STCP 13=OE 14=DS 15=Q0 16=VCC
top view, notch up74HC595116Q1VCC215Q2Q0314Q3DS413Q4OE512Q5STCP611Q6SHCP710Q7MR89GNDQ7S

Top view, pin 1 at the dot. Same pin numbers as the TI part; only the names differ.

Diodes lists SO-16 and TSSOP-16 only, no DIP.

Source: Diodes Incorporated 74HC595 8-Bit Shift Register With 8-Bit Output Register, DS35492, p. 1 (Pin assignments, SO-16 / TSSOP-16 top view); Diodes Incorporated 74HC595 8-Bit Shift Register With 8-Bit Output Register, DS35492, p. 2 (Pin descriptions table: Q0 to Q7, Q7S, MR, SHCP, STCP, OE, DS); Diodes Incorporated 74HC595 8-Bit Shift Register With 8-Bit Output Register, DS35492, p. 8 (Ordering information: 74HC595S16-13 (SO-16) and 74HC595T16-13 (TSSOP-16))

Which one do you have?

TI sells it as SN74HC595: SN74HC595N is the plastic DIP, SN74HC595D the SOIC and SN74HC595PW the TSSOP, all with the same pin numbers. Diodes Incorporated drops the prefix (74HC595S16 for SO-16, 74HC595T16 for TSSOP-16) and has no DIP. The SN54HC595 is TI's military-temperature version in ceramic packages.

The two makers label the pins differently, and Arduino tutorials mix both sets. TI's SER, SRCLK and RCLK are Diodes' DS, SHCP and STCP; TI counts the outputs QA to QH, Diodes Q0 to Q7. The numbering is the same, so a circuit drawn with one set of names works with the other chip.

PinTIDiodesWhat it does14SERDSserial data in11SRCLKSHCPshift clock12RCLKSTCPlatch clock10SRCLRMRclear, active low13OEOEenable, active low15QAQ0first output7QHQ7last output9QH'Q7Sserial out
Figure 1. Same pin, two names. QB to QG (Q1 to Q6) sit on pins 1 to 6; ground is pin 8 and VCC pin 16 on both.

A 74HCT595 is the TTL-input version with the same pins; it runs from 4.5 to 5.5 V and is not covered here. Watch the first output: QA is on pin 15, across the chip from QB on pin 1, so a row of LEDs wired in pin order comes out with the first LED at the wrong end.

How it works: shift, then latch

Inside are two 8-bit registers. Each rising edge on SRCLK moves every bit of the shift register one place along and takes a new bit from SER into the first place. The outputs do not move while this happens. A rising edge on RCLK then copies all eight bits into the storage register at once, and that register drives the pins. So the outputs jump from the old byte to the new one in a single step, with no flicker while the bits travel.

SERSRCLKRCLKQAQH10110001latch: outputs change hereold byte
Figure 2. Eight clocks shift the byte in; one latch pulse shows it. The first bit sent ends up in QH, the last in QA.

SRCLR low empties the shift register but leaves the outputs alone until the next latch. OE high switches all eight outputs off (high impedance) without losing the byte, which is also how a PWM signal on OE dims every LED at once. QH' always shows the last bit of the shift register, latched or not, so it can feed the next chip.

Absolute maximum ratings

The two makers agree on the supply: 7 V absolute maximum, 2 to 6 V recommended. Each of QA to QH may carry ±35 mA, and the VCC or ground pin 70 mA for the whole chip. Diodes rates its serial output Q7S lower, at ±25 mA. TI rates the SN74HC595 from −40 to 85 °C; the Diodes part is rated to 125 °C and also states a 500 mW total power limit, which TI's sheet does not give.

Absolute maximum and recommended ratings, from each maker's datasheet
ParameterSN74HC595NDIP-1674HC595S16SOP-16
Supply voltage, absolute maximum VCC−0.5 to 7 V−0.5 to 7.0 V
Supply voltage, recommended VCC2 to 6 V2.0 to 6.0 V
Continuous output current, QA-QH IO±35 mA±35 mA
Continuous output current, QH' IO±35 mA±25 mA
Current through VCC or GND ICC, IGND±70 mA70 mA
Input and output clamp current IIK, IOK±20 mA±20 mA
Total power dissipation PTOTnot given500 mW
Thermal resistance, PDIP-16 RθJA67 °C/Wno DIP
Operating temperature TA−40 to 85 °C (SN74)−40 to 125 °C
Input rise or fall time, max Δt/ΔvVCC = 4.5 V500 ns500 ns/V

The 70 mA pin limit is the one that bites. Eight outputs at 35 mA each would be 280 mA, four times what the VCC pin may carry, so the per-output figure is never available on all eight at once. Size the outputs so the sum stays well under 70 mA, as the worked example does.

Input levels, output drive and speed

At VCC = 4.5 V unless marked (min/max unless marked typical)
ParameterSN74HC595NDIP-1674HC595S16SOP-16
High-level input voltage, min VIH3.15 V3.15 V
Low-level input voltage, max VIL1.35 V1.35 V
Output high, min VOHIOH = −6 mA, 25 °C3.98 V (4.3 V typ)3.84 V (4.32 V typ)
Output high, min VOHIOH = −6 mA, full range3.84 V (to 85 °C)3.7 V (to 125 °C)
Output low, max VOLIOL = 6 mA, 25 °C0.26 V (0.17 V typ)0.33 V (0.15 V typ)
Output low, max VOLIOL = 6 mA, −40 to 85 °C0.33 V0.33 V
Supply current, max ICCVCC = 6 V, inputs at a rail8 µA (25 °C), 80 µA (to 85 °C)8 µA (25 °C), 80 µA (to 85 °C)
Clock frequency, max fclock25 °C / to 85 °C31 / 25 MHz30 / 24 MHz
Set-up, SER before SRCLK, min tsu−40 to 85 °C25 ns13 ns
Latch clock to output, max tpdCL = 50 pF, 25 °C30 ns (17 ns typ)35 ns (20 ns typ)
Power dissipation capacitance Cpdtypical, no load400 pF43 pF (at 5 V, 1 MHz)

At 4.5 V an input below 1.35 V counts as low and above 3.15 V as high, the same pair on both sheets. Diodes' feature list claims Schmitt-trigger action on every input; TI's sheet makes no such claim, so keep clock edges clean on long wires.

The output rows are written at 6 mA. At that current a high output from 4.5 V stays above 3.84 V over TI's full temperature range (4.3 V typical), and a low output stays below 0.33 V. The datasheets give no row at 20 mA, so anything past 6 mA per pin is outside what either maker guarantees.

Speed is rarely the limit. TI allows a 25 MHz clock up to 85 °C at 4.5 V (31 MHz at 25 °C), needs SER steady 25 ns before each SRCLK edge and nothing after it, and the outputs settle 37 ns at most after RCLK. A microcontroller toggling pins in software runs far slower than that.

The two sheets disagree on the power dissipation capacitance: TI prints 400 pF, Diodes 43 pF at 5 V and 1 MHz. It only matters when the clock runs at megahertz rates for hours; for an LED driver it is lost in the LED current.

What it is good for

  • Eight more outputs from three microcontroller pins, and eight more again for each chip on the chain.
  • LED bars, seven-segment displays and LED matrices. TI's own typical application drives eight LEDs, one per output, each through 560 Ω.
  • Driving relay or motor boards through transistors, where each output only feeds a base or gate.
  • Setting many control lines at once with no glitches between states, thanks to the latch.

It only outputs. To read eight switches with three pins, the matching part is a parallel-in shift register such as the 74HC165. When one line out of eight has to be picked, a 74HC138 decoder needs no clocking at all. The logic families lesson compares HC with the other CMOS and TTL families.

Worked example: eight LEDs from three pins on 5 V

A 5 V microcontroller drives SER, SRCLK and RCLK. SRCLR is tied to 5 V and OE to ground. Each output drives a red LED to ground through its own resistor, so an LED lights when its bit is 1. Neither maker prints a 5 V row, so the numbers use the 4.5 V limits, the nearest supply both sheets specify. At 5 V the outputs drive a little harder, so the 4.5 V figures leave margin.

1. Pick the current. The output rows are written for 6 mA, so start there. At that current a high output may sit as low as 3.84 V from a 4.5 V supply, a drop of 0.66 V.

2. Size the resistor. R = (5 − 2 − 0.66) / 6 mA = 390 Ω, which is the E12 value 390 Ω.

3. Check the whole chip. TI's typical 4.3 V at 6 mA behaves like 33.3 Ω in series with each output. With 390 Ω, one LED takes about 7.09 mA and all eight take 56.7 mA, which is 81 % of the 70 mA VCC pin limit. That is too close for a chip that may run warm in a closed box.

4. Go one step up. With 470 Ω, one LED takes 5.96 mA typical and 4.98 mA in the worst case, and all eight take 47.7 mA, 68 % of the limit. The LEDs are barely dimmer. TI's typical application on page 13 goes one step further, to 560 Ω, and its design notes on page 14 give the same two limits: 35 mA per output and 70 mA for the part.

5. Heat. Each lit output drops about 0.199 V inside the chip, so eight of them dissipate 9.5 mW. In the DIP, at 67 °C/W, that warms the die by 0.63 °C. Each resistor takes 17 mW, so any 0.25 W part will do.

6. Send a byte. To light QA, QE, QF, QH, send 1 0 1 1 0 0 0 1 on SER, first bit first, one SRCLK pulse per bit, then pulse RCLK once. On an Arduino, shiftOut(dataPin, clockPin, MSBFIRST, value) followed by a pulse on the latch pin does the same: MSBFIRST sends bit 7 first, so bit 7 lands on QH and bit 0 on QA.

13 OE 10 SRCLR 12 RCLK 11 SRCLK 14 SER 1 QB 15 QA 16 VCC 8 GND U1 +5 V R1 470 Ω LED A R2 470 Ω LED B SER SRCLK RCLK +5 V
Figure 3. The LED outputs as ngspice checked them, with QA and QB drawn: QA holds a 1 and LED A carries 5.96 mA, QB holds a 0 and LED B stays dark. With OE pulled high both go dark. QC to QH are wired the same way. Put 100 nF from pin 16 to pin 8 at the chip.
390 Ω56.7 mA470 Ω47.7 mA70 mA limit0VCC pin current, eight LEDs on
Figure 4. The whole chip, all eight LEDs on, typical outputs. One E12 step on the resistors buys about 9 mA of margin.

Worked example in numbers

Resistor per LED
470 Ω
LED current, typical
5.96 mA
All eight on
47.7 mA
VCC pin limit
70 mA

Daisy-chaining: 16, 24 or more outputs on three pins

Wire QH' (pin 9) of the first chip to SER (pin 14) of the second, and run the same SRCLK and RCLK lines to both. Each clock now moves the data through sixteen places, so you send two bytes, the one for the far chip first, and then latch once. Every extra chip adds eight outputs and no microcontroller pins.

dataclocklatchU1SER 14SRCLK 11RCLK 12QH' 9outputs 0 to 7U2SER 14SRCLK 11RCLK 12QH' 9outputs 8 to 15clock to bothlatch to both
Figure 5. Data runs through the chips in series; clock and latch go to all of them in parallel.

At TI's 25 MHz the chip could take two chips' worth of bits in about 0.66 µs and four chips in 1.3 µs, so the speed at which the microcontroller toggles its pins sets the pace. Each chip in the chain still has its own 70 mA supply-pin limit and needs its own 100 nF capacitor. On long chains, run the clock as a single line from chip to chip, not a star, and keep it short.

Advertisement

Tips and checks

  • Fit 100 nF from pin 16 to pin 8, right at the chip, on every chip in a chain.
  • Never leave SRCLR or OE open. Tie SRCLR to VCC and OE to ground, or to a microcontroller pin if you want to clear or blank the outputs.
  • Pull OE high with 10 kΩ at power-up if the loads must not twitch. SRCLR clears only the shift register, so the outputs can show any byte until the first latch.
  • Add up the current of every output that can be on at once and keep it under about 50 mA per chip, not the 70 mA limit.
  • For loads above a few milliamps, let the output drive a transistor or a 2N7000 gate rather than the load itself.

The IC power and decoupling lesson covers the capacitor, and logic levels the input thresholds when the microcontroller runs on 3.3 V.

Substitutes

The TI and Diodes parts swap freely: same pins, same function, same input limits at 4.5 V and the same ±35 mA output rating. Only the pin names on the drawing change.

Pin numbers as on the DIP-16 or SO-16 top view, notch or dot at pin 1.
PartPinsVerdict
74HC595S16 (Diodes)same pins, names Q0-Q7, DS, SHCP, STCP, MRA true equivalent in SO-16: same pins, same function and the same 4.5 V input limits and ±35 mA output rating. Only the pin names differ, and it is rated to 125 °C.Diodes Incorporated 74HC595 8-Bit Shift Register With 8-Bit Output Register, DS35492, p. 2; Diodes Incorporated 74HC595 8-Bit Shift Register With 8-Bit Output Register, DS35492, p. 5
SN74HC595D / SN74HC595PWsame as the DIPThe same TI die in SOIC and TSSOP. Same pin numbers, same data sheet, for a PCB.Texas Instruments SNx4HC595 8-Bit Shift Registers With 3-State Output Registers (SCLS041J), p. 3

Bench check: is it working?

  1. Power it from 5 V with SRCLR to VCC, OE to ground and SER, SRCLK and RCLK to ground, and measure the supply current with no LEDs fitted. It should be a few microamps; TI allows 80 µA at 6 V up to 85 °C. Milliamps means a floating input or a damaged chip.
  2. Set SER high, give SRCLK one pulse and RCLK one pulse. QA (pin 15) should go high and the other outputs stay as they were.
  3. Give seven more SRCLK pulses with SER low, then one RCLK pulse. The 1 should now be on QH (pin 7), and QH' (pin 9) high too.
  4. Pull OE high. Every output should float; with LEDs fitted, all go dark. Pull it low and the same byte comes back.

If the outputs show the byte one step late, RCLK and SRCLK are tied together: TI notes that the shift register is then one clock ahead of the outputs. Give RCLK its own pin.

What we'd do

Use a 74HC595 whenever a project needs more outputs than the microcontroller has: LED bars, seven-segment digits, relay boards through transistors. Give it three pins (data, clock and latch), tie SRCLR high and OE low (or OE to a PWM pin for brightness), and fit 100 nF at every chip. Size LED resistors for the whole chip, not one output: 470 Ω for red LEDs on 5 V keeps all eight under 50 mA. Buy the DIP from TI for the breadboard and either maker's SO-16 for a board.

Questions people ask

What is the pinout of the 74HC595?

Pins 1 to 7: outputs QB to QH. Pin 8: ground. Pin 9: QH', serial out. Pin 10: SRCLR, clear, active low. Pin 11: SRCLK, shift clock. Pin 12: RCLK, latch clock. Pin 13: OE, output enable, active low. Pin 14: SER, data in. Pin 15: QA. Pin 16: VCC.

What is the difference between SRCLK and RCLK?

SRCLK shifts the bits along inside the chip, one per rising edge; the outputs do not change. RCLK copies the finished byte to the eight outputs in one step. Diodes calls them SHCP and STCP; Arduino tutorials often call RCLK the latch pin.

How much current can a 74HC595 output give?

The absolute limit is ±35 mA per output and 70 mA for the whole chip through VCC or ground. The datasheet only guarantees output voltages at 6 mA, so design to about 6 mA per output and keep the total under about 50 mA.

Does the 74HC595 work on 3.3 V?

Yes. It is specified from 2 to 6 V, so it runs from a 3.3 V board such as an ESP32 and takes its logic directly. The outputs then swing to 3.3 V, and the LED resistors need recalculating for the smaller voltage.

Why is QA on pin 15 and not pin 1?

That is how the chip was laid out: QB to QH run down one side on pins 1 to 7 and QA sits on the other side next to VCC. Wire your first LED to pin 15, or the bar comes out in the wrong order.

Buying the 74HC595 in India

The DIP is stocked by most Indian component sellers, usually as TI's SN74HC595N and sometimes with no maker named. Check the full number on the body: a listing for the 74HC595 may turn out to be a 74HCT595, with the same pins but TTL input levels and a 4.5 V minimum supply. Our guide to buying electronic components in India compares ten online sellers and covers how to spot fakes.

Advertisement

One email a month from the bench

New circuits, lessons, part guides and calculators, on the first Sunday of each month.

We'll send one email to confirm. Every email has a one-click unsubscribe. Privacy policy

Used in these lessons

Lessons that go deeper

Datasheets this page was checked against

Makers revise datasheets. If the copy you download has a newer revision and a number here disagrees with it, the datasheet wins, and we would like to hear about it.