8X8M-Guide

NOTE the location of pin 1 is printed on the underside of the matrix pin 2 resistor (1K Ohm) pin 3 resistor (1K Ohm) pin 4 resistor (1K Ohm) pin 5 res...

19 downloads 505 Views 419KB Size

LED Displays (8 x 8 LED Matrix) The Pieces

The Theory & Code

8 x 8 Bi-Colour LED Matrix

LED Matrix LED Matrix's are great fun, you can create funky patterns, scroll messages, or create something entirely bizarre. Sadly controlling one is a tad complicated. But once mastered is easily repeatable. .: A quick refresher on LED control can be found here tinyurl.com/cmn5nh :.

(common anode)

x1 1K ohm Resistor (brown-black-red)

x8

The Schematic pin 10

pin 2

pin 11

pin 12

pin 13

resistor (1K Ohm)

pin 3

resistor (1K Ohm)

pin 4

resistor (1K Ohm)

pin 5

resistor (1K Ohm)

pin 6

resistor (1K Ohm)

pin 7

resistor

analog pin 0

analog pin 1

analog pin 2

analog pin 3

Matrix Wiring Each matrix has 128 LEDs (64 Red & 64 Green) however there is noticeably not 256 leads. Instead the LEDs are wired into a matrix. This matrix has the LED's 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 this without a micro-controller) Displaying Images (Scanning) Now that we can light any LED we choose it's time to move on to displaying a (small) image. To do this we will use a scan pattern. In the example code we define a bitmap image (an array of 8 bytes, each bit representing one LED). Next we scan through this array one byte at a time, displaying one column then the next. If we do this fast enough (about 1000 times a second) it appears as an image. It sounds complex but if you download the code and play around it should quickly become clear. (play around with the delay times to see the flicker) Example Code .: Code to test your display a test pattern http://tinyurl.com/yjozkrr :. .: Code to scroll a message across the display http://tinyurl.com/yl3pc28 :.

(1K Ohm)

pin 8

resistor (1K Ohm)

pin 9

resistor (1K Ohm)

More Things to Try Dislike Red? you can switch to green by shifting the column pins from COL-R to 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 matrix is larger than the breadboard. Install the wires, fold them outwards then insert the matrix.

NOTE the location of pin 1 is printed on the underside of the matrix

The Layout Sheet A B C D E

ROW-4 R-COL-4 G-COL-4 ROW-3 R-COL-3 G-COL-3 ROW-2 R-COL-2 G-COL-2 ROW-1 R-COL-1 G-COL-1

1 2 3 4 5 6 7 8 9 10 11 12

13

15

F G H I

8x8 Matrix

14

(common anode)

J 12 11 10

16

9

17

8

18

7

19

6

20

5

21

4

22

3

23

2

24

1

1 2 3 4 5 6 7 8 9 10 11 12

8-ROW 8-COL-R 9-COL-G 7-ROW 7-COL-R 7-COL-G 6-ROW 6-COL-R 6-COL-G 5-ROW 5-COL-R 5-COL-G

13

13 to pin 10

14

14 to pin 11

15

15 to pin 12

16

16 to pin 13 17 to analog 0

17 18

18 to analog 1

19

19 to analog 2

1K Ohm

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 to pin 7 27

27

to pin 8 28

28

CIRC-21 29

to pin 9 29

LED30Displays

(8 x 8 Bi-Colour Matrix)

A B C D E

.: Instructions: print out, cut out, get making :. .: for more details visit: http://tinyurl.com/yhwxv6h :.

30 F G H I

J

Subscribe

© Copyright 2013 - 2019 AZDOC.PL All rights reserved.