Sei sulla pagina 1di 1

LED Displays

(8 x 8 LED Matrix)

The Pieces The Theory & Code


8 x 8 Bi-Colour LED Matrix
LED Matrix's are great fun, you can create funky patterns, scroll messages, or
LED Matrix create something entirely bizarre. Sadly controlling one is a tad complicated. But
(common anode)
once mastered is easily repeatable.
x1 .: A quick refresher on LED control can be found here tinyurl.com/cmn5nh :.
Matrix Wiring
1K ohm Resistor Each matrix has 128 LEDs (64 Red & 64 Green) however there is noticeably not
(brown-black-red)
256 leads. Instead the LEDs are wired into a matrix. This matrix has the LED's
x8
anodes connected across rows (8 pins) then the red and green LED's cathodes
attached across columns (8 pins each). To light an LED connect it's rows anode
to +5volts, and through a resistor, it's columns cathode to ground. (you can try

The Schematic this without a micro-controller)


Displaying Images (Scanning)
analog analog analog analog Now that we can light any LED we choose it's time to move on to displaying a
pin 10 pin 11 pin 12 pin 13 pin 0 pin 1 pin 2 pin 3
(small) image. To do this we will use a scan pattern. In the example code we
pin 2
define a bitmap image (an array of 8 bytes, each bit representing one LED).
resistor
(1K Ohm)
Next we scan through this array one byte at a time, displaying one column then
pin 3
resistor
(1K Ohm)
the next. If we do this fast enough (about 1000 times a second) it appears as an
pin 4
resistor
image. It sounds complex but if you download the code and play around it
(1K Ohm)
should quickly become clear. (play around with the delay times to see the flicker)
pin 5
resistor
(1K Ohm)
Example Code
pin 6
resistor
(1K Ohm)
.: Code to test your display a test pattern http://tinyurl.com/yjozkrr :.
pin 7
resistor .: Code to scroll a message across the display http://tinyurl.com/yl3pc28 :.
(1K Ohm)

pin 8
resistor
More Things to Try
(1K Ohm)
Dislike Red? you can switch to green by shifting the column pins from COL-R to
pin 9
resistor
(1K Ohm) COL-G. Using too many Digital pins? Try controlling the display using shift
registers (74HC595) tinyurl.com/l43cph or a dedicated display chip (MAX7219)
http://tinyurl.com/4s2oo7 (arduino.cc)
.: Full Datasheet & Pinout http://tinyurl.com/yff4v8u :.

The Circuit NOTE The Layout Sheet


the location of pin 1
is printed on the A B C D E F G H I J
underside of the matrix 13 12
ROW-4 1 8x8 1 8-ROW
14 11
R-COL-4 2 Matrix 2 8-COL-R
15 10
G-COL-4 3 (common anode) 3 9-COL-G
16 9
ROW-3 4 4 7-ROW
17 8
R-COL-3 5 5 7-COL-R
18 7
G-COL-3 6 6 7-COL-G
19 6
ROW-2 7 7 6-ROW
20 5
R-COL-2 8 8 6-COL-R
21 4
G-COL-2 9 9 6-COL-G
22 3
ROW-1 10 10 5-ROW
23 2
R-COL-1 11 11 5-COL-R
NOTE 24 1
the matrix is larger than
G-COL-1 12 12 5-COL-G
the breadboard. Install the 13 13 to pin 10
wires, fold them outwards 14 14 to pin 11
then insert the matrix.
15 15 to pin 12
16 16 to pin 13
17 to analog 0
17
18 to analog 1
18
19 1K Ohm to analog 2
19
20 to analog 3
20
21 21
22 to pin 2
22
23 to pin 3
23
24 to pin 4
24
25 to pin 5
25
26 to pin 6
26
27 to pin 7
27
28 to pin 8
28
CIRC-21
29 to pin 9
29
LED30Displays 30
(8 x 8 Bi-Colour Matrix)
A B C D E F G H I J

.: Instructions: print out, cut out, get making :.


.: for more details visit: http://tinyurl.com/yhwxv6h :.

Potrebbero piacerti anche