74HC595 digit/Limits/07. One latch per digit
Limits · 07 of 9

One latch per digit

On most 595 boards the chip's serial output comes out to a pin so a second board can chain from the first. On the TK53 it goes nowhere. Two boards can still share DATA and CLOCK, with a LATCH each: one more pin per digit.

What chaining needs

A 74HC595 has a ninth output, Q7S (QH' in TI's naming), pin 9. It is the bit falling off the end of the shift register: after eight more clocks, the byte that was inside comes out of it. Wire it to a second 595's DATA, share CLOCK and LATCH, and sixteen clocks fill both chips.

On the TK53, pin 9 is in no net. No trace leaves it and no header pin carries it. The page this book replaces said the board chains; it cannot.

What works instead

One latch per digit
Wiring
Pins used
3
Digits working
1 of 2
Not on this board: pin 9, the 595's serial output, is in no net, so nothing reaches the second board's DATA. It stays blank, or shows whatever its DATA wire floats to.

Wire both boards' DATA to one pin and both CLOCKs to another. Every byte you shift goes into both shift registers. Give each board its own LATCH, and raise only one: that board copies the byte to its digit, and the other keeps what it had.

void showOn(int latchPin, byte pattern) {
  digitalWrite(latchPin, LOW);
  shiftOut(DATA_PIN, CLOCK_PIN, MSBFIRST, pattern);
  digitalWrite(latchPin, HIGH);
}

Two digits cost four pins, three cost five. A chain would cost three for any number. For more than two or three digits, a four-digit display with a driver chip of its own, such as the TK51, is less wiring.

Every board draws its own segment current from VCC, so two 8s at 3.3 V are up to 140 mA from your board's 3V3 pin. Most ESP32 boards' regulators supply that comfortably; add up the current before adding a fourth.

When it does not work

My second board stays blank when I chain it.

There is nothing to chain from. The 595's serial output, Q7S, is in no net on this board, so no pin carries the bits on. Wire the second board's DATA to the same pin as the first's, and give it its own LATCH.

Both boards show the same digit.

They share LATCH as well as DATA and CLOCK, so both latch every byte. Give each board its own LATCH pin, and raise only the one whose digit you have just shifted in.

How many boards can share DATA and CLOCK?

Several: each extra board adds one input on those two wires, which a microcontroller pin drives easily. The cost is a LATCH pin each, and each board's own current from the supply, up to about 70 mA at 3.3 V.

Where this goes next

Five wires and a sketch, for an Uno, an ESP32, an ESP32-S3 or a Pico.

Count 0 to 9 →

Edit this page — content/books/hc595-segment-led/one-latch-per-digit.mdx

Community

Questions about this product

See what other owners have asked, and read their solutions.

Ask a question ↗

74HC595 Segment LED

Loading discussions…

Discuss this article

Ask about this page. The answer stays here, on the page it belongs to, for whoever hits the same wall next.

Browse Modules and blocks on the forum →