Topics/Displays/0.56-inch 7-Segment Digits with a 74HC595 Driver Board
SPIDIGITALbeginner

0.56-inch 7-Segment Digits with a 74HC595 Driver Board

A 24-pack of 0.56" seven-segment digits and twelve 74HC595 driver boards: three wires instead of eight, which digit is common cathode and which is common anode, how the ten pins line up, and the current limit that bites on 8.

24-Pack 0.56" 7-Segment LED with 74HC595 Driver

Specifications

In the box12 × 74HC595 driver boards, 12 × common-cathode digits, 12 × common-anode digits, 24 × snap-on enclosures, and pin header strips
Digit0.56 inch single character, red, with a decimal point. 5161AS is common cathode, 5161BS is common anode
Digit pinoutTen pins, five each side at 2.54 mm. Nearest row E D com C H, far row G F com A B, decimal point bottom right
Driver board14 pins: VCC, GND, SER, SRCLK, RCLK, QH′ and eight segment outputs A–H. OE and the reset pin are fixed on the board
Series resistorsEight, one per segment output, already on the back of the board. Unmarked, so the value is not published
Supply2 to 6 V on VCC. Use the same rail the digit's commons are on — 5 V on an Arduino Uno
Output current6 mA per output at 5 V as specified, 35 mA absolute maximum, and 70 mA through the whole chip
InterfaceThree wires: data, shift clock and latch. Chainable through QH′, so more digits still means three wires

What it does

A seven-segment digit is eight separate LEDs — seven bars and a dot — and each one has its own pin. Wired directly that is eight microcontroller pins and eight resistors for a single character, and sixteen for two.

The small black board in the box removes that. It holds a 74HC595 shift register, which takes a byte one bit at a time on three wires and sets eight output pins from it, and it already carries the eight series resistors. Three wires for one digit, and still three wires for six, because the boards chain.

The contents of the 24-pack spread out: twelve small black 74HC595 driver boards shown front and back, twenty-four white seven-segment digits with red numerals and letters showing, four strips of pin headers, a stack of grey 3D-printed enclosure frames with dark filter windows, and a Lonely Binary product card.
Twelve driver boards, twenty-four digits and an enclosure for each one. The digits split twelve and twelve into the two kinds below.

The two kinds of digit

Twelve of the twenty-four are 5161AS, common cathode. Twelve are 5161BS, common anode. They are the same size, the same colour and the same pinout, and the only place the difference is written is the side of the plastic.

5161AS5161BS
Shared legcathodeanode
Both commons go toGND5 V
A segment lights when its pin isHIGHLOW
Segment byteas writtenevery bit inverted
Blank0x000xFF

Which one you pick up decides two wires and one line of the sketch. Two kinds of digit has the whole of it.

The 74HC595 driver board photographed from both sides. The label side is printed lonely binary, 74HC595, SHIFT REGISTER, with pins QH′ B A F G GND VCC along the top and H C D E SRCLK RCLK SER along the bottom. The chip side shows a 16-pin surface-mount chip marked SM74HC595D between four pairs of small black resistors, with the same pin names mirrored.
Fourteen pins: two for power, three for your board, eight for the digit, and QH′ for the next board along. The names are printed on both sides, mirrored.

Wiring, in four lines

  1. 5 V to the board's VCC, GND to its GND.
  2. Three digital pins to SER, SRCLK and RCLK.
  3. The board's A to H to the digit's A to H. H is the decimal point.
  4. The digit's two common pins to GND on a 5161AS, or 5 V on a 5161BS.

The board's segment pins are in the digit's own order — G F A B on one row, E D C H on the other — so none of the eight jumpers has to cross another. A crossing wire is a wire in the wrong hole.

What it can and cannot do

One digit shows 0 to 9, A to F and a decimal point: sixteen characters, because that is as far as seven bars go. There is no K, M, V, W or X.

The limit worth knowing before you build a clock is not per segment, it is per chip. A 74HC595 may pass 70 mA through its ground pin in total, and a digit showing 8. lights all eight segments at once. How much current works it out and says what to do about it.

Where to start

The handbook below is ten short articles with a working figure in each. If you only read one, read two kinds of digit — it is the question this box turns on. If you have the parts in front of you and want it counting tonight, count 0 to 9 on an Uno is written out wire by wire.

When it doesn’t work

Which of my digits is which?
It is moulded into the side of the white plastic, below the window, in the same colour as the plastic — tilt it under a lamp. `5161AS` is common cathode: both common pins go to GND, and a segment lights when its output goes HIGH. `5161BS` is common anode: both common pins go to 5 V, and a segment lights when its output goes LOW. You get twelve of each, and nothing on the front of the part distinguishes them.
The display shows every segment lit and never changes.
The sketch's `COMMON_ANODE` setting does not match the part. The blank pattern is `0x00` on a common-cathode digit and `0xFF` on a common-anode one, so a mismatch lights everything at power-on, before the loop has run once. Set it from the part number and both the blank pattern and the digits come right together.
Nothing lights at all.
Three things produce exactly this and none of them is a segment wire: the commons not connected, the commons on the wrong rail, or no shared ground between the Arduino and the driver board. Check them in that order. A single broken segment wire costs you one bar, not the whole digit.
Do I need to add current-limiting resistors?
No. There are eight on the back of the driver board, one in series with each segment output, so the segment pins go straight to the digit. Their value is not marked and is not published — if the exact current matters, put a meter in series with one segment and measure it.
Can I drive more than one digit?
Yes, and it still takes three pins. QH′ on one board goes to SER on the next, and SRCLK and RCLK are shared, so any number of boards behaves as one long shift register. The byte you send first ends up on the board furthest from the Arduino, which is the thing that catches people.
Do the boards need soldering?
The pin headers ship loose in the bag, so yes, if you want to use a breadboard. A wire pushed through an unsoldered hole makes a contact whose resistance changes whenever anything moves, and the symptom is segments that drop out and come back — which reads as a code bug and is not one. The digits themselves have their own legs and need nothing.
Is this the same as a four-digit display module?
No. A four-digit module lights one digit at a time very fast and depends on code running constantly to keep them all looking lit. Each digit here has its own driver board and holds whatever you last sent it, indefinitely, with the processor doing nothing.

The 0.56″ 7-segment handbook

10 articles · about 45 minutes

This page is the reference: what the part is, what it is made of, and the questions people arrive already asking. The handbook is the walk — the same part in the order somebody actually meets it.

Three pins, eight segments

2 articles

A digit is eight separate LEDs. Wiring eight of them to eight pins works once and then you run out of board. The chip on the small board is the way around that.

What is in the box

2 articles

Twelve driver boards and twenty-four digits, and the twenty-four are two different parts that look the same from the front.

Getting the wires right

2 articles

Ten pins on the digit, fourteen on the board, and an order that was chosen so none of the eight jumpers has to cross another.

What one chip can drive

2 articles

The limit that matters is not per segment, it is per chip — and the digit that meets it is the one with every segment lit.

Build it

2 articles

Count 0 to 9 on an Arduino Uno, wire by wire — and the five things that go wrong, each with the symptom that tells them apart.

Edit this page — content/modules/seven-segment.mdx

Community

Questions about this product

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

Ask a question ↗

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.

Browse Modules and blocks on the forum