More digits, same three wires
One wire from QH′ to the next board's SER, and two boards behave as one sixteen-bit register on the same three pins. The catch is the order: the digit you want furthest away has to be the one you send first.
The ninth bit out
Eight clock pulses fill the shift register. A ninth pushes the first bit off the end — and rather than losing it, the chip presents it on a pin called QH′.
Wire QH′ to the next board's SER and nothing is lost at all. The two registers become one sixteen-cell chain with a seam in the middle, and the same SRCLK and RCLK drive both.
Send the far digit first
This is the part that catches people. Every clock pulse pushes everything one place further along, so after sixteen pulses the byte you sent first has travelled furthest — through the near board, out of QH′, and into the far one.
For a clock showing 12:34, that means sending the 1 first and the 4 last.
Reverse it and you get 43:21, every wire correct, and an hour spent checking
jumpers.
digitalWrite(PIN_RCLK, LOW);
shiftOut(PIN_SER, PIN_SRCLK, MSBFIRST, segOut(kDigits[tens])); // far board
shiftOut(PIN_SER, PIN_SRCLK, MSBFIRST, segOut(kDigits[units])); // near board
digitalWrite(PIN_RCLK, HIGH); // both digits change togetherOne RCLK pulse, after both bytes. That is what makes the pair update at the
same instant instead of a fraction of a millisecond apart.
What each extra board costs
Three wires from the Arduino, still. SER goes to the first board only; SRCLK and RCLK go to all of them.
Eight more clock pulses per update. An Uno's shiftOut takes roughly a
hundred microseconds a byte, so six digits is well under a millisecond. You
would have to be updating thousands of times a second before this mattered.
A digit's worth of current from your 5 V supply. Each board has its own 74HC595 carrying its own digit, so the per-chip limit does not get worse as you chain. Your supply is what has to grow.
The one number that changes is QH′'s own drive: the datasheet specifies it for 4 mA rather than the 6 mA of the segment outputs. It is feeding the next board's SER pin, which draws almost nothing, so it never comes up in practice — but it is why QH′ is not a ninth segment output.
Twelve boards in the box
Twelve driver boards and twenty-four digits means you can build a six-digit clock and still have half the parts spare. The chain does not care how long it is; the thing to plan is the supply and the enclosure, not the wiring.
When it does not work
Swap the order of the two shiftOut calls. The byte sent first is pushed all the way through the near board and into the far one, so a four-digit clock sends its leftmost digit first and its rightmost digit last. Nothing about the wiring is wrong.
Check three things: QH′ on the first board to SER on the second, SRCLK and RCLK reaching both boards, and both boards powered. The second board has its own VCC and GND and does not get power through QH′.
You are latching between the two bytes. Pull RCLK low once, send both bytes, then pull it high once. One latch for the whole chain is what makes all sixteen outputs change at the same instant.
More than you will use. Every extra board adds eight clock pulses to each update, so a six-digit display takes six times as long to write as one — still well under a millisecond on an Uno. The practical limit is your 5 V supply, not the chain.
Every wire, the sketch, and the settings the Arduino IDE needs.
Count 0 to 9 on an Uno →Edit this page — content/books/seven-segment/chaining-with-qh.mdx
Questions about this product
See what other owners have asked, and read their solutions.
24-Pack 0.56" 7-Segment LED with 74HC595 Driver
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.