74HC595 shift register outputs wrong or floating: pin order, OE and clear

Tie OE to ground and SRCLR to 5 V, and pulse the latch pin after shifting.

What the message means

The chip needs the enable and clear pins in fixed states. Without a latch pulse the outputs do not change.

Fix it in this order

  1. Connect OE (pin 13) to ground.
  2. Connect SRCLR (pin 10) to the supply.
  3. Shift the bits out, then pulse the latch pin.
  4. Change between MSBFIRST and LSBFIRST if the order is reversed.
  5. Add a resistor per LED output.
  6. Add a small capacitor across the supply of the chip.

Why it happens

Two separate problems look alike. Outputs in the wrong order mean the bit order passed to shiftOut() does not match your wiring: MSBFIRST sends bit 7 first, LSBFIRST sends bit 0 first. Outputs that float or flicker usually mean a control pin is unconnected: the 74HC595 has an active-low output enable (OE) and an active-low clear (SRCLR), and a floating input can behave randomly.

Wiring checks

Tie OE to GND so the outputs are enabled and SRCLR to VCC so the register is not cleared. Keep the latch pin (RCLK) low while shifting and raise it once at the end to update the outputs. Put a 0.1 µF capacitor between VCC and GND close to the chip.

digitalWrite(LATCH_PIN, LOW);
shiftOut(DATA_PIN, CLOCK_PIN, MSBFIRST, pattern);  // try LSBFIRST if reversed
digitalWrite(LATCH_PIN, HIGH);

Example sketch: change pins and values for your own wiring. It has not been bench-tested on your hardware.

If you see this, do this

You seeDo this
Outputs never changeLatch not pulsed.
Outputs reversedBit order.

MAX7219 matrix, 5 V current.

Last reviewed: November 2026. These are the usual causes and the order that finds them fastest. Test on your own board; clones and cables differ.

Why this happens

The 74HC595 contains two registers. Pulses on the shift clock (SRCLK, pin 11) move the serial data from the data pin (SER, pin 14) into the first register. Nothing appears on the outputs until a pulse on the storage clock (RCLK, pin 12) copies the first register into the second, which drives outputs QA to QH. That is why the latch pulse matters, and why outputs stay unchanged if it is missing.

Order depends on how bits are sent. shiftOut() with MSBFIRST sends bit 7 first, so after eight clocks bit 0 sits at QA and bit 7 at QH. LSBFIRST reverses this. With two chips daisy-chained through QH’ (pin 9), the first byte sent ends up in the far chip. Each output can supply only a few milliamps in normal design and the whole chip is limited to around 70 mA total, so check the datasheet before driving many LEDs at once.

How to confirm the cause

  • Measure OE (pin 13) with a multimeter. It should read 0 V, and SRCLR (pin 10) should read the supply voltage. Anything else explains outputs that do not hold.
  • Send 0xFF, then 0x00, and watch all outputs go on and off together. If that works, the wiring and latch are fine.
  • Send a single bit, 0b00000001, and see which output lights. If it is QH and not QA, flip between MSBFIRST and LSBFIRST.
  • Look at the latch pin with an LED test or a logic analyzer to confirm it goes low and then high once per update.
  • Check the supply at the chip pin 16 and the decoupling capacitor close to it.

Worked example

A walking light that proves the order and latch. The pin names are examples.

for (int i = 0; i < 8; i++) {
  digitalWrite(LATCH_PIN, LOW);
  shiftOut(DATA_PIN, CLOCK_PIN, MSBFIRST, 1 << i);
  digitalWrite(LATCH_PIN, HIGH);
  delay(200);
}
// MSBFIRST: bit 0 ends at QA, so the light moves QA, QB ... QH

Common mistakes

  • Leaving OE or SRCLR unconnected on a breadboard.
  • Pulsing the latch before the shift instead of after.
  • Connecting the latch and shift clock to the same pin.
  • Driving LEDs without resistors or exceeding the total current of the chip.
  • Driving a 5 V 74HC595 with a 3.3 V signal. This can be marginal; check the input threshold in the datasheet or use a 74HCT part.

If this did not fix it

  • Check the breadboard contacts and the power rails; a loose ground gives random output.
  • Check the length of the clock wire. Noise on the clock line can add false shifts.
  • Check the daisy-chain order if you use more than one chip, since the first byte goes to the farthest chip.