MAX7219 tube clock/Getting it lit/04. The board, pin by pin
Getting it lit · 04 of 12

The board, pin by pin

Five pads down the left edge, a MAX7219CWG in the middle, two capacitors and exactly one resistor. That resistor is worth knowing about: it sets how bright the display can ever get, and no sketch can reach it.

Both sides

The driver board, both sides
solder side
Which side
Which pad
Pads on the edge
5
Called in the datasheet
VCC
Chip
MAX7219CWG
Five pads, and only three of them carry information. GND and VCC are power; DIN, CLK and CS are the whole protocol. The order printed on the board is GND, VCC, DIN, CLK, CS from the corner down, and it is worth checking against your wires rather than your memory — GND and VCC being adjacent means one place off is 5 V into a data pin. The board carries a 10 kΩ resistor and two capacitors and nothing else: the chip needs exactly one external resistor, and that one sets how bright the segments can ever get.

Switch sides and step through the pads. The display side is eight digits and a seam; everything else on the board is on the back.

The solder side of the driver board, a long thin black PCB. Five oval pads down the left edge are printed GND, VCC, DIN, CLK and CS. A twenty-four pin wide SO chip marked MAXIM MAX7219CWG sits in the middle, with a twelve-pad display footprint in two rows of six either side of it. Two capacitors and one chip resistor sit near the pads, and the silkscreen reads lonely binary, 0.28 inch segment LED display.
Everything but the digits is on this face. The two blocks of twelve pads are the two panel footprints.
The display side of the same board: eight red seven-segment digits in a single black strip, each with a decimal point, with a hairline seam visible down the middle where the two four-digit panels butt against each other.
The other face, and the seam. Four digits left of it, four right, and one chip driving both.

The five pads

GND and VCC are power, and they are next to each other at the top of the row. That is the one thing worth double-checking before you switch on, because one position out puts 5 V into DIN and ground into VCC.

DIN, CLK and CS are the whole protocol. DIN carries the bits, CLK tells the chip when each one is valid, and CS marks the end of a message. There is no minimum clock speed — the chip is a shift register and does not time out — so any GPIO pin will do for all three and none of them need to be your board's hardware SPI pins.

The datasheet calls CS LOAD. The board prints CS because every library calls it that, and because a reader with the board in their hand is looking for the word their code uses. It is one pin with two names.

The chip

MAXIM MAX7219CWG — the wide 24-pin SO package, commercial temperature grade. The CWG suffix matters only if you are buying a replacement; the W is the wide body and the G is the lead finish.

Its close relative the MAX7221 has slew-limited outputs for lower emissions and a properly SPI-compatible interface. This board has the MAX7219, and the difference that will actually reach you is the brightness scale: the MAX7219's sixteen steps are odd thirty-seconds, from 1/32 to 31/32, and the MAX7221's are sixteenths. Quoting the wrong column of that table is the commonest MAX7219 mistake in circulation.

Two capacitors and one resistor

The two small parts beside the pads are decoupling — a bulk capacitor and a ceramic one across VCC and GND, exactly as the datasheet's applications section asks for. They are there because the chip switches a couple of hundred milliamps on and off eight hundred times a second, and without them that lands on your supply as ripple.

The single resistor is the interesting one. The MAX7219 needs precisely one external resistor, between V+ and its ISET pin, and it sets the peak current every segment will be driven at — about a hundred times the current through the resistor itself. This board's is marked 01C, which in the EIA-96 code is 10 kΩ, and the datasheet's own floor is 9.53 kΩ for a 40 mA segment current.

So the board is built for close to the chip's maximum brightness, and it is built in. Software can make the display dimmer than that and can never make it brighter, which is the subject of a later chapter.

The two footprints

Twelve pads each, in two rows of six, one either side of the chip. They are identical, and each takes one four-digit panel. Left is digits 0 to 3, right is digits 4 to 7, and digit 0 is the leftmost digit on the finished display — which happens to also be the numbering every library uses, so nothing has to be translated anywhere.

When it does not work

Which pad is pin one?

GND, at the corner. The printing runs GND, VCC, DIN, CLK, CS from that corner down the edge, and it is on the solder side — so with the digits facing you the order is reversed. Read the silkscreen rather than counting from a photograph.

I wired VCC and GND the wrong way round

They are adjacent, which is why this happens. The MAX7219 has no reverse-polarity protection of any kind, and reversed 5 V across it for more than a moment usually kills it. If a board has gone dark and warm, that is the first thing to check and the answer is a new driver board.

Can I change the brightness resistor?

In principle, by replacing the 10 kOhm chip resistor on the back. In practice there is no reason to: the datasheet's minimum is 9.53 kOhm, so 10 kOhm already has the segments near the chip's 40 mA maximum, and anything larger you can achieve in software with the intensity register instead.

There is no reset pin

There is not one on the chip either. A MAX7219 comes out of power-up blanked with its registers in a known state, and the only way to reset it is to cut its supply. If you need to blank it from a sketch, that is the shutdown register.

Where this goes next

The listing says 3.3 V or 5 V. The datasheet says 4.0 V minimum, and the logic threshold is the reason that matters.

Five volts, and the threshold

Edit this page — content/books/max7219-tube-clock/the-board-pin-by-pin.mdx

Community

Questions about this product

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

Ask a question ↗

MAX7219 Vintage Tube LED Clock Kit

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