SparkFun LED Array (8x7) Hookup Guide

Pages
Contributors: Shawn Hymel
Favorited Favorite 6

Board Overview

How Charlieplexing Works

To understand how the LED Array (8x7) works, we need to first learn a little about Charlieplexing. The name came from Charlie Allen at Maxim Integrated, who proposed the solution in 1995 for controlling multiple LEDs with less pins from a microcontroller.

The technique relies on using the ability for microcontroller pins to enter into a high impedance state (tri-state) and thus prevent current from entering or leaving that pin. Let's take a 3-pin example. With Charlieplexing, we can have 6 LEDs attached to 3 pins: n x (n - 1) = 3 x (3 - 1) = 6.

Charlieplexing 6 LEDs

We need to use the microcontroller's ability to tri-state pins to make this work. If we make pin 1 an output and high, pin 2 output and low, and pin 3 high impedance ("Hi-Z"), then D1 will light up.

Lighting up first LED with Charlieplexing

If we switch it and make pin 2 high and pin 1 low, then D3 will light up.

Lighting up D3 with Charlieplexing

And if we make pin 3 high, pin 2 low, and pin 1 Hi-Z, D6 will light up.

Lighting up D6 with Charlieplexing

This works because we can make the unused pins high impedance from the microcontroller. High impedance mode looks like an open circuit, so current does not flow into or out from the Hi-Z pins.

If we cycle through all 6 permutations quickly enough, we can trick our eyes into thinking that all the LEDs are on. If we leave selected LEDs off, we can create simple images with our LED array!

Shape on LED Array

The LED Array 8x7

Top of LED Array 8x7

The 8x7 LED array takes our 6-LED example and expands it out to 56 LEDs and 8 pins. We can cycle through all 56 permutations of the pins to turn each LED on individually, and if we cycle fast enough, we can create simple images and text (at least according to our eyes).