You are on page 1of 18

This is my new LED matrix, that can talk with the PC and i can write to it in real time.

The matrix is an attempt to finish my leftover LEDs from the LED cube project. I used 3 74HC595 shift registers and a 4017 counter.

Max7219

How to drive an led display matrix.


Driving a 64 LED display matrix is quite simple and just requires ONE TRICK!

(Note: Item Displayed is not the same as the circuit shown on this page)

(CLICK IMAGE to Buy This Kit)

Here you can find out how to drive an led matrix with 64 LEDs (8 rows by 8 columns - 8x8 display) or less e.g. 35 LEDs (7 rows by 5 columns - 5x7 dot matrix).

It uses persistence of vision to let you drive the 64 led matrix with only 10 microcontroller outputs! Normally you would need 64 outputs for 64 LEDs but by using multiplexing and a helper chip you can get away with 10.

LED Display multiplexing simply means turning on one led for a short period of time and doing this repeatedly for each LED. If you do this fast enough then your eye will not notice any flicker.

Note: The unit used in this project is simply an array of 64 LEDs. The LEDs are no different to any other LEDs but it saves a huge amount of soldering as all the wiring has been done for you. ...Or you could wire it up yourself if you can't get hold of the module. If you wire it yourself you still only need 10 control wires (just wire you leds the same as shown in the module diagram).
LED display matrix 8x8 LEDs

Learn about the tool used for creating this diagram.

A dot matrix led display is simply a grid of LEDs arranged for use by multiplexing.

Specification
dot matrix led display driver Red 8x8 LEDs

ProSchematic: Schematic drawing program.


This schematic drawing program is an easy to use schematic capture tool. I use it to create all the schematics and diagrams on this site.

Note: unlike other expensive tools: ProSchematic has : * No limits on schematic size. * No limits on number of pins. * No limits on netlisting. * No limits on library part creation.

Download FREE Trial here

CLICK image for larger view

Schematic capture: Main buttons It displays all the main tools as large buttons at the top of the screen (these are the frequently used tools) and are easier to hit than most other tools with tiny cryptic symbols. With smaller buttons below these (less frequently used tools).

Drawing a schematic diagram is a simple matter of selecting the library tool (looks like a book). You choose a part and hit the select button and then place it in the schematic (click the left mouse button). Click right to stop pasting parts (or hit escape) Then select the wire tool to make connections between part pins. Processes In addition it has a process box (top left in the picture above) giving you easy access to the functions used in creating a schematic e.g. netlisting which also checks the schematic for various errors. Other processes are bill of materials and auto connection dots. Attributes The schematic drawing tool shows attribute data which is data associated with a part e.g. the part number R1 or its value 10k but you can also add your own attributes to any part. A useful feature is the attribute display that shows all the data associated with the current part i.e. you don't have to select different menus to see data such as manufacturer part value (that you may have added) - it's there readily displayed. If you click on the above diagram you'll see the attribute box (at lower left in the picture above) showing the details of Q1 - the currently selected item - it has a Decal of TO92. Library The library has a large selection of components but if a part does not exist then using library editor to create a new part is very simple. The only difference between drawing in the schematic area and drawing a library part is that you can add a pin element all the other controls are identical to the main schematic editor. So if you can draw in the schematic area then you can easily create new parts. PCB creation ProSchematic generates a Tango netlist format which you can use to create a pcb. All you have to do is fill in the 'Decal' attribute data and this value is used in generating the netlist For example with a resistor (R2 say) you might use a Decal value of RC07 and you would get a netlist output (a net connects R1 and R2): NET_32 R1.1 R2.2 R1 RC07 R2 RC07

You can then import this into a pcb creation tool... well you might want a few more components though! Layers An unusual feature of the schematic drawing program is that it lets you use layers - normally this feature is used on graphic drawing programs. It's main use here is that you can create background elements that you leave in the background on a different layer and you then set that layer to 'unselectable'. This means you can work on any other part of the drawing without selecting the background. It lets you create the following sort of layout diagrams (this one is from the 12F675 tutorial):

Example: Using layers with the schematic drawing program: ProSchematic

Here the solderless breadboard (and each hole) in the solderless breadboard is a schematic item and these are placed into layer 6 while all the other items are on layer 1 so - you can move wires around without affecting the background.

Download schematic drawing program FREE Trial here

Sign up for MicroZine (the free microcontroller ezine) and you can get the schematics from this site - in ProSchematic format : this gives you a head start in creating your own schematics. End of schematic drawin g program page.

[?] Subscribe To This Site

How to drive an led display matrix.


Driving a 64 LED display matrix is quite simple and just requires ONE TRICK!

Custom Search

Home Forum Project Ideas C Course LCD-Keys one port PIC Projects TIPS & Techniques PIC Introduction PIC Programming Programmer Types PIC Programmer Schematic Tool PIC Tutorials (Note: Item Displayed is not the same as the circuit shown on this page) Digital Downloads (CLICK IMAGE to Buy This Kit) Store My Secret Oscilloscopes About Me Here you can find out how to drive an led matrix with 64 Contact Me LEDs (8 rows by 8 columns - 8x8 display) or less e.g. 35 Terms of Use LEDs (7 rows by 5 columns - 5x7 dot matrix). Search This Site Articles MicroBlog Books It uses persistence of vision to let you drive the 64 led Resource Links matrix with only 10 microcontroller outputs! Site Map Problem?Normally you would need 64 outputs for 64 LEDs but by Solution using multiplexing and a helper chip you can get away with Privacy Policy
10.

LED Display multiplexing simply means turning on one led for a short period of time and doing this repeatedly for each LED. If you do this fast enough then your eye will not notice any flicker.
Note: The unit used in this project is simply an array of 64 LEDs. The LEDs are no different to any other LEDs but it saves a huge amount of soldering as all the wiring has been done for you. ...Or you could wire it up yourself if you can't get hold of the module.

If you wire it yourself you still only need 10 control wires (just wire you leds the same as shown in the module diagram).
LED display matrix 8x8 LEDs

Learn about the tool used for creating this diagram.

A dot matrix led display is simply a grid of LEDs arranged for

use by multiplexing.

Specification
dot matrix led display driver Red 8x8 LEDs

Dot matrix LED display project details. Dot matrix LED display Project Mikroelectronika C compiler V5.0.0.3 Free! 16F88/16F84 (retargetable to other PICs that have an enough pins). Easy. Multiplexing the display. Easy. No special notes Swap Row/Col names in software h/w the same. Enter your details to get the Download Link and get the microcontroller newsletter:

Compiler

Target

Software level Software notes Hardware level Hardware notes

Project version 1.01

Project files

Your Name:

Primary E-Mail:
(Note: Your email is safe it will never be sold or rented).

You will get All the C source code and hex file.

Essential C Programming Course: CLICK HERE.

You can program the PIC in circuit through the ICSP connector.

More projects for the led dot matrix display...


Includes driving the led matrix using interrupts and scrolling methods...

Hardware operation
Dot Matrix LED Display schematic (Click diagram to open a pdf)

Learn about the tool used for creating this diagram.

Multiplexing
If you tried to drive 64 individual LEDs you would need 64 individual output pins (each led connected to a output pin on one side and ground on the other). Obviously that is a tall order so the way round it is to use persistence of vision which is a way of describing how your eye works. Your eye reacts slowly to changes in light intensity so that if a light is turned on and off quickly enough then it does not notice that the light is off. Basically your eye remembers a light pulse for a short time. The approximate time is 20ms so if the light is turned on at a frequency >50Hz (1/20ms) then your eye will not notice any flicker at all. Multiplexing uses this fact to reduce the number of pins needed to drive an LED display. You can do this by splitting the 64 led display into 8 rows and 8 columns which lets you drive it using 8 row outputs and 8 column outputs. In fact the 8x8 led matrix block used here has all the leds arranged in this way already.

Dot Matrix LED display :TC15-11SRWA

Note: The orientation of the led block must be pin 1 at the top left to view characters the right way up. Each row is driven in turn and as long as all of the rows are driven within a time period of 20ms it will appear as though the LEDs are on continuously. To turn a specific led 'ON', data is output to the column drivers when a row is driven.

Helper chip
To save more pins it is common to use a helper chip and in this project it is a Johnson counter (a 4017). This generates a walking one every time that it's clocked. Since you only want one row on at a time it is the ideal chip for this application.

Note: In this project when the 4017 has been reset it outputs a logic high at Q0 - which is not connected - so during reset the 4017 does nothing. This allows you to use the column driver port for something else if you want to when you are not driving the LEDs. To drive the 4017 all you need is two pins one for reset and one for clock. So to fully drive the 64 matrix led display you need only

10 microcontroller output pins.


You don't have to use a 4017. If you have enough pins you could drive the led display directly e.g. using a 16F877A. It all depends on your circuit and what resources you need to use.

Learn about the tool used for creating this diagram.

Row current sink


To get more current through the LEDs you need to use a transistor at each row driver as the maximum current you can sink or source is low. The row driver sinks all the current from each active row LED. To let the current flow you need to use a transistor at each row as the maximum current you can sink or source is

very low for an HC4017 (1ma). I used a ULN2803 (an array of 8 grounded NPN transistors) which is massive over design in terms of its collector current capability (500mA) but provides a convenient (and cheap) package which is useful for prototyping. Note you can use individual NPN transistors if you want to normal standard transistors are OK as the maximum current is about 60mA through a column.

Character Set
The most difficult thing about using the dot matrix LED display is defining the characters. Basically for ASCII characters you need an array of 128 blocks each having 8 column data numbers. The usual way is to get out a piece of graph paper and define your characters by drawing blocks where a pixel is on. You then translate each line into hex (binary to hex is very easy) and then transfer this information to your program source code. I have defined characters 0-9 which are cycled continuously.

Dot Matrix LED Display Software


Project files for the dot matrix led display
Compiler project files 16F88-dot-matrix-8x8.ppc C Source files. 16F88-dot-matrix-8x8.c Header files. types.h bit.h charset8x8.h Output files 16F88-dot-matrix-8x8.hex

Dot Matrix Led Display code description.


16F88-dot-matrix-8x8.c

This contains all the code except : 8x8 character definitions in charset8x8.h Bit manipulation routines found in bit.h Type definitions in types.h

The code is simple and easy to follow - all the action happens in main(). It enters a continuous a continuous loop blinking an led on port A and driving the columns of the 8x8 led display and driving the 4017 (for rows). At each blink the next character is selected from the character set. The code repeatedly executes the for loop and it must go faster than 20ms for 8 columns - so the code has to go faster than 20ms/8 = 2.5ms - which it does. So there is no visible flicker. At each row (selected at each iteration of the for loop) the next column data is output so that the entire character is displayed.

VIDEOS ideas for the 8x8 matrix NOTE: Click the bottom left PLAY button ONLY (not the middle one).

Video of a simple block game for the 8x8 matrix.


(To make this yourself you will have to add two buttons to the hardware and write some code in c).

^^^Click bottom left play button only.

Click here for more 8x8 matrix LED videos.

More projects for this circuit

To By the LED Kit below Click HERE

(Note: Item Displayed is not the same as the circuit shown on this page)

(CLICK IMAGE to Buy This Kit)

Jump from dot matrix led display to Best-microcontroller-projects home page

Share this page:

Don't forget to Sign Up for your Microcontroller Newsletter With "Essential tips and techniques", ..."New Site Info" and more...

Including a free project : How to drive an LCD and 12key keypad using "Only One 8 Bit Port" with no interface logic!...

(Works for any microcontroll er)

This costs you : Nothing...

Just fill out the form below and you'll get full C source code and project schematic and description.

Name: E-Mail:

First Name

Primary Em

Don't worry -- your e-mail address is totally secure. I promise to use it only to send you MicroZine

Web

www.best-microcontroller-projects.com

You might also like