Connecting with Jumper Wires

Ribbon cables and their corresponding headers are sometimes a topological puzzle. Here’s a trick to help keep track…

If you hold the ribbon cable flat — no folds — and with both connectors facing you, keys pointed the same direction — now there is a 1:1 correlation between the pins. The top-right pin on one plug links to the top-right on the other plug, and so forth. This holds true even if the cable has a doubled-over strain relief. As long as the keys point the same way and the plugs face the same way, pins are in the same positions at both ends.

Plugged into a socket on the LED matrix, one header now faces away from you. If you double the cable back on itself (not a twist, but a fold)…to access a specific pin on the socket, the left and right columns are now mirrored (rows are in the same order — the red stripe provides a point of reference). You’re looking “up” into the plug rather than “down” into the socket.

For example, R1 (the top-left pin on the INPUT socket) appears at the top-right of the exposed plug. You can jam a wire jumper in that hole to a corresponding pin on the Arduino…

So! From the prior page, refer to the socket that’s correct for your matrix type. The labels may be a little different (or none at all), but most are pretty close to what’s shown here.

 

Then swap the columns to find the correct position for a given signal.

Either end of the ribbon cable can be plugged into the matrix INPUT socket. Notice below, the “key” faces the same way regardless.

With the free end of the ribbon toward the center of the matrix, the Arduino can be hidden behind it.

With the free end of the ribbon off the side, it’s easier to see both the front of the matrix and the Arduino simultaneously, for making additional connections or for troubleshooting.

Using color-coded wires helps a lot! If you don’t have colored wires, that’s okay, just pay close attention where everything goes. Our goal is a fully-populated plug like this:

So! Let’s proceed with the wiring, in groups…

Connect Ground Wires

32x32 and 64x32 matrices require three ground connections. 32x16 matrices have four.

 

Current Arduino Uno boards have three ground pins (the third is next to pin 13). If you need additional ground connections — for a 32x16 matrix, or if using an older Arduino board with only 2 ground pins — a solderless breadboard is handy for linking all these pins.

 

Arduino Mega boards have five ground pins. Same three as the Arduino Uno, plus two more next to pins 52 & 53.

Upper RGB Data

Pins R1, G1 and B1 (labeled R0, B0 and G0 on some matrices) deliver data to the top half of the display.

 

On the Arduino Uno, connect these to digital pins 2, 3 and 4.

 

On Arduino Mega, connect to pins 24, 25 and 26.

Lower RGB Data

Pins R2, G2 and B2 (labeled R1, G1 and B1 on some matrices) deliver data to the bottom half of the display. These connect to the next three Arduino pins…

 

On Arduino Uno, that’s pins 5, 6 and 7.

 

On Arduino Mega, pins 27, 28 and 29.

Row Select Lines

Pins A, B, C and D select which two rows of the display are currently lit. (32x16 matrices don’t have a “D” pin — it’s connected to ground instead.)

 

These connect to pins A0, A1, A2 and (if D pin present) A3. This is the same for both the Arduino Uno and Mega.

LAT Wire

For 32x32 and 64x32 matrices, LAT connects to Arduino pin 10.

 

For a 32x16 matrix, use Arduino pin A3.

 

This is the same for Arduino Uno or Mega.

 

The LAT (latch) signal marks the end of a row of data.

CLK Wire

CLK connects to pin 8 on an Arduino Uno, or pin 11 on an Arduino Mega.

 

The CLK (clock) signal marks the arrival of each bit of data.

OE Wire

Last one!

OE connects to Arduino pin 9. This is the same for both the Arduino Uno and Mega.

 

OE (output enable) switches the LEDs off when transitioning from one row to the next.

That’s it. You can skip ahead to the “Test Example Code” page now.

Last updated on 2015-05-04 at 04.27.56 PM Published on 2012-12-11 at 06.19.11 PM