8x8 LED matrix/On the wires/08. One board, not a chain
On the wires · 08 of 10

One board, not a chain

The MAX7219 was designed to be chained, DOUT of one chip into DIN of the next. On the TK52 the chip's DOUT pin reaches no pad, so a TK52 cannot pass data on. Two TK52s can still share one board, with a CS wire each.

Where DOUT goes

One board, not a chain
Wire up
Boards
2
Signal wires
4
Boards in a 3-pack
3
DIN and CLK go to both boards, each board gets its own CS. A board only takes a message when its own CS rises, so the sketch talks to one at a time. Four wires for two boards, five for three.

The MAX7219 has a DOUT pin. Whatever arrives on DIN comes out of DOUT sixteen and a half clocks later, so a second chip wired to it receives the first chip's message once the next one has pushed it along. That is how the 3-pack's chainable module and the 32×8 matrix run many chips on three wires.

On the TK52, DOUT is soldered to nothing. The net list gives it a net of one pin. The chainable module's OUT edge has DOUT as its fourth pin; the TK52's only header has DIN there, and no OUT edge at all.

Two boards, two CS wires

The chip only takes a message when its own CS rises. So two TK52s can share DIN and CLK and still be told apart: give each its own CS pin, and send a message with only that board's CS going low and high. The other board sees the bits go past and ignores them.

That is four signal wires for two boards, five for three. A chain of the 3-pack's modules stays at three wires however long it gets, which is the reason that module exists.

When it does not work

I wired two TK52s in a line and only one works.

There is nothing to wire in a line: the TK52 has no DOUT. Join DIN to DIN and CLK to CLK, and give each board its own CS pin. Then send each board's messages with its own CS low.

Both TK52s show the same picture.

They share a CS as well as DIN and CLK, so every message lands on both. Move one board's CS to a pin of its own and send to one CS at a time.

Can a TK52 go on the end of a chain of 3-pack modules?

Yes, as the last one. Its DIN takes the previous module's DOUT, CS and CLK are shared, and the sketch counts it as one more device. It cannot go anywhere but the end.

How many TK52s can one board run?

One CS pin each, plus DIN and CLK shared. Power is the real limit: each board can draw up to 330 mA with everything lit, so more than one wants a 5 V supply of its own with the grounds joined.

Where this goes next

Five wires and a sketch with no library.

The first picture →

Edit this page — content/books/matrix-led/one-board-not-a-chain.mdx

Community

Questions about this product

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

This page covers several products. Choose yours to see the right 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 →