0% found this document useful (0 votes)
21 views5 pages

Led Matrix Howto

The document discusses LED matrix displays, including their common sizes and colors, how they are structured with rows and columns, and different methods for controlling them including directly with a microcontroller or using decoder or shift register integrated circuits to reduce the number of required microcontroller pins. Common integrated circuits that can be used to control the rows and columns of LED matrices are also described.

Uploaded by

creative_26
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views5 pages

Led Matrix Howto

The document discusses LED matrix displays, including their common sizes and colors, how they are structured with rows and columns, and different methods for controlling them including directly with a microcontroller or using decoder or shift register integrated circuits to reduce the number of required microcontroller pins. Common integrated circuits that can be used to control the rows and columns of LED matrices are also described.

Uploaded by

creative_26
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

LED Matrix Information

Written by nuxie1
Monday, 15 January 2007

Page 1 of 5 Article Index

LED Matrix Information


An LED Matrix is an array of LED's with the anode or positive terminal of each row connected More Detail
together, and the cathode or negative terminal of each column connected together. Or the anode can Different Drivers
be connected to a column, and cathode connected to a row. Putting it all together
Comments

An 8x8 array

They come in various sizes, colors and formats.


The most common sizes are 5x7, 5x8 and 8x8 displays. This means that, for example, a 5x8 display would have 5 columns with
8 rows of LED's.

A 5x7 Display

An 8x8 Display

The most common colors are red, green and yellow. There are also two and three colored versions, with the different colored
LED's sharing a common pin in each row or column and a seperate pin for the corresponding column or row. This allows each
color to be turned on or off individually. When there are two or more colors, the LED's will share a common anode or cathode
(positive or negative respectively).
LED Matrix Information
Written by nuxie1
Monday, 15 January 2007

Page 2 of 5 Article Index

LED Matrix Information


Lets examine more closely the actual layout of a LED matrix. More Detail
Different Drivers
Putting it all together
Comments

5x5 Schematic

Here we see that each row connects to that rows cathode or negative leg of the LED's. Correspondingly, each column connects
the anode or positive leg together. Please not that a LED matrix can also be the other way around.

To control a LED matrix, we have two options:

Cycle through each row, turning on the LED's in that row as needed
Cycle through each column, turning on the LED's in that column as needed

It is not possible to control the LED matrix all at once, as all the individual LED's share both their inputs. The way around this is
to use Persistance of Vision. By cycling through each row or column quite fast (~50Hz and above) you should not see any flicker,
and instead see the whole LED matrix display as if it was all working at once.

If we were to choose the first of the two options, we would first ground the first row connection (connection ROW1) and leave
the remaining ROWX connections floating or high.

Then, we would pull each column connection high if we wanted that LED to turn on, or leave it floating or low to keep it off. For
example if we wanted to turn on LED3 and LED5, then with the ROW1 connection pulled low, we would leave COL1, COL2 and
COL4 floating or low, and pull COL3 and COL5 high.
Then after leaving ROW1's displayed LED's on for a set period of time, we would pull ROW1 high or floating and pull ROW2 low.
At the same time, we would pull the corresponding column connections high to turn on the individual LED's in that row.

But how do we control the switching off and on of these connections? The easiest way is with the use of a microcontroller or
microprocessor, as well as some additional circuitry.
LED Matrix Information
Written by nuxie1
Monday, 15 January 2007

Page 3 of 5 Article Index

LED Matrix Information


Using just a microcontroller with a 5x5 display would require 10 available output pins on the More Detail
microcontroller. Also, the output pins would have to be capable of sourcing and sinking the required Different Drivers
current to drive it. As a worst case scenario with all LED's on and drawing 5mA, the microcontroller Putting it all together
would have to source 25mA in total (since only one row or column would be on at one time). Comments

When using larger displays, a microcontroller with even more output pins and current drive is needed. We can get around these
requirements by using some additional 74 series logic chips to go between the microcontroller and LED matrix.

A better way to select each row (or column) would be to use a decoder. For any size up to 8x8, a 1-8 decoder such as the
74LS138/74HC138 or 74LS155/74HC155 would do.

These logic chips can takes 3 inputs (A, B, C) from the microcontroller to select one of 8 outputs (Y0,..,Y7). For example,
sending '000' would select output Y0, and sending '100' would select output Y1, etc. Thus only 4 output ports are needed to
control and clear it. Note that this chip uses active-low outputs so when the output is active it corresponds to a low, with all the
other outputs kept high. Depending on how you are using this chip, you may need to use an additional chip to invert the output.
Also note that the current drive is very low, and so something like a darlington array may be needed.

Another option is to use a serial in, parallel out shift register. These work by clocking in 8 bits to set which outputs are on or off.
The 74LS164/74HC164 is a basic shift register which will cause the outputs to shift once each time a new bit is clocked in. This
can be offset by turning off the selected row or column while the new row or columns data is clocked in.

A better option is the 74LS595/74HC595 shift registers, which features an additional storage register so that the new output data
can be clocked in without effecting the previous output.

To use this chip, first you must clock in the required bits using the SER line, with the SCK line used for the clock input. Then once
all 8 bits have been clocked in, the RCK line is used to transfer the data from the storage register to the output register. Then
with the !G input pulled low to enable the outputs, the clocked in data can be used to control a connected LED matrix row or
column. The HC (High Speed CMOS) version has quite a high current drive capability, and can be used to drive a LED matrix
directly.
LED Matrix Information
Written by nuxie1
Monday, 15 January 2007

Page 4 of 5 Article Index

LED Matrix Information


Using two 74HC595 chips, we can control both the rows and columns of a LED matrix. Below shows More Detail
them connected to a 5x5 display, but of course this can be expanded to an 8x8 display. Note that no Different Drivers
resistors are used, as each LED will be switched on and off very fast no real damage should be Putting it all together
caused to them. However, it may be a good idea to provide appropriate resistors to each column if Comments
you will be switching through each row in turn. The opposite applies for switching through each
column.

Click for larger version

Each row is connected to an output of the bottom IC1. Each column is connected to an output of the top IC2. I have kept all the
inputs to the two chips seperate except for the enable line, although you could just as well connect the SCK, SCL and RCK inputs
on each chip together.

To use this circuit, you would need to connect the the left inputs to the output ports on a microcontroller. To display something,
you would first clock in the required data to both IC's using the Serial In and Ser_CLK inputs. One IC would have to be set to
turn on just one row or column, with the other set to turn on the required LED's in that row or column as needed.
Then that data would be latched to the output by using the Ser_Latch (RCK) inputs (one of which I forgot to show), and set
Ser_EN low to enable the outputs.
Then you would leave it display that for a small period of time (0.02 seconds for 50 Hertz) and then clock in the next row or
columns data, repeating the whole process.
LED Matrix Information
Written by nuxie1
Monday, 15 January 2007

Page 5 of 5 Article Index

LED Matrix Information


I hope this guide will prove somewhat useful in learning how to control an LED matrix. It is a good More Detail
idea to read the relevant datasheet for your particular display to see how it is connected and to help Different Drivers
workout the extra components you will need to drive it. Then once the hardware to control it is Putting it all together
setup, you will need to write the appropriate software for your microcontroller. Comments

I am currently working on a PIC18F2550 controller Green and Red LED Matrix display, using 74HC595 chips. Stay tuned for
more info on this.

You might also like