LED Matrix Module

Tips, Tricks and methods for programming, learn ways of making your programming life easier, and share your knowledge with others.

Moderators: Benj, Mods

Post Reply
User avatar
JohnCrow
Valued Contributor
Valued Contributor
Posts: 1367
Joined: Wed Sep 19, 2007 1:21 pm
Location: Lincolnshire
Has thanked: 364 times
Been thanked: 716 times
Contact:

LED Matrix Module

Post by JohnCrow »

8 x 8 LED Array

Introduction:

This project describes the building and testing of a simple 8 x 8 LED Array Module.
The unit is about 35mm x 35mm and contains 8 rows of 8 LED’s.
Unlike the Matrix E-Block this has dual colour LED’s (Red & Green), but is not able to be multiplexed.
The device is common anode and has a total of 24 pins.
The datasheet is not at first glance overly clear on the connections, but once studied for a few minutes all will be clear.
(Helps if you can read Chinese too  )

Hardware:

1 x Oolout LED Array (Costs about £3.00)
2 x 8 Pin SIL Header Sockets
2 x 8 Pin SIL Header Pins
1 x Piece Of Vero-Board to suit
1 x EB 006 Microcontroller Programmer.
3 x 9-PIN D To SIL Header adaptors
Female – Female Jumpers.

Connections:

The device was soldered to a piece of Vero-Board using SIL sockets to allow the module to be removed easily.
Sill Headers are used to allow jumper cables to connect the module to the microcontroller programmer or an Arduino.
The main disadvantage using these sort of connections is a total of 24 data lines (Ports B, C, & D) are needed.

The vertical pin spacing is very slightly different to standard proto-boards / vero-boards etc. To get round this it is possible to bend the pins inward slightly. Horizontal spacing is fine.


Anodes are connected to PORT C on the Microcontroller
  • PIC LED
    0 11
    1 19
    2 16
    3 13
    4 3
    5 6
    6 9
    7 12
Cathodes are connected to PORT B = RED and PORT D GREEN. These are all connected via a 1k-ohm resistor.
Two resistors were used rather than just one on the anode, so both LED’s can be turned on at the same time. (Giving an orange colour). Just using 1 resistor, would allow double the current to flow in each colour if used like this.

PORT D
  • PIC LED
    0 24
    1 21
    2 18
    3 15
    4 1
    5 4
    6 7
    7 10
PORT B
  • PIC LED
    0 23
    1 20
    2 17
    3 14
    4 2
    5 5
    6 8
    7 11
Test Programs:

Some simple test programs were written to verify operation of the module.
Simple Binary Counter
Each row is turned on in sequence, counting from 0 to 255 in binary. (All columns lit) The same program was tried with each column being lit in sequence, again counting from 0 to 255 in binary (All rows lit)
These were repeated using both green and red led’s. A third test was done using both on together.
A set of sample flowcharts for both FC5 and FC6 are attached below.
Using a shift register such as a 74HC595 will allow the device to be driven with less data lines.

Video Link:

A simple video captured with my Smartphone showing the operation.
http://youtu.be/Iah2zRzs_8M

LED_Matrix.jpg
LED_Matrix.jpg (44.86 KiB) Viewed 22301 times
CloseUp.jpg
CloseUp.jpg (96.5 KiB) Viewed 22300 times
Matrix Demos.zip
(10.7 KiB) Downloaded 722 times
1 in 10 people understand binary, the other one doesn't !

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: LED Matrix Module

Post by acestu »

Hi John,

I got one of these Matrix displays in an Arduino kit, however there dosen't seem to be any markings on the pins, it has 2 x lots of 8 pins like yours, is there an orientation mark on them somewhere or a pin 1 mark etc ?

cheers
Stuart
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

User avatar
Steve001
Valued Contributor
Valued Contributor
Posts: 1189
Joined: Wed Dec 31, 2008 3:37 pm
Has thanked: 460 times
Been thanked: 523 times
Contact:

Re: LED Matrix Module

Post by Steve001 »

Hi stu,

i have one of these somewhere

http://www.farnell.com/datasheets/1698877.pdf

you could compare with a meter on diode check to see what's what

Steve
Success always occurs in private and failure in full view.

User avatar
JohnCrow
Valued Contributor
Valued Contributor
Posts: 1367
Joined: Wed Sep 19, 2007 1:21 pm
Location: Lincolnshire
Has thanked: 364 times
Been thanked: 716 times
Contact:

Re: LED Matrix Module

Post by JohnCrow »

Hi
There is a pin 1 marking, though you need a mag lens to see it.
Mine has 2 lots of 12 pins (dual colour)

With pin 1 top right, pin 12 is top left
pin 13 is bottom left and pin 24 bottom right.

It does have a " HX" printed on the top edge when orientated as above.

http://oomlout.co.uk/collections/extra- ... 8-bicolour
1 in 10 people understand binary, the other one doesn't !

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: LED Matrix Module

Post by acestu »

Hi John,

I will get my magnifying glass out and have a look then, also thanks for the link I have just ordered one to have a play with..... :D

cheers
Stuart
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

User avatar
JohnCrow
Valued Contributor
Valued Contributor
Posts: 1367
Joined: Wed Sep 19, 2007 1:21 pm
Location: Lincolnshire
Has thanked: 364 times
Been thanked: 716 times
Contact:

Re: LED Matrix Module

Post by JohnCrow »

Hi Stu
They are a nice little unit, especially for the cost.
I ordered a few shift registers as well with mine as well. With that I'll be able to use a lot less pins on the PIC to drive them.
Taking 3 ports is certainly a bit over the top.

Though testing Jordys component and the Vinculum module is top of the list for this weekends projects :)
1 in 10 people understand binary, the other one doesn't !

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: LED Matrix Module

Post by acestu »

Hi John,

Which shift registers did you get ?

cheers
Stuart
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

User avatar
JohnCrow
Valued Contributor
Valued Contributor
Posts: 1367
Joined: Wed Sep 19, 2007 1:21 pm
Location: Lincolnshire
Has thanked: 364 times
Been thanked: 716 times
Contact:

Re: LED Matrix Module

Post by JohnCrow »

Hi
the Shift registers are 74HC595. I ordered them same time as the LED Matrix
1 in 10 people understand binary, the other one doesn't !

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: LED Matrix Module

Post by acestu »

Thanks John, I will order some..............

Stuart
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: LED Matrix Module

Post by acestu »

Hi John,

The FC6 demo files will not open, one says Attribute "Start" Not found, another says Attribute "count" Not found...do you have any ideas please...

cheers
Stuart
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

dazz
Posts: 1314
Joined: Sun Jan 15, 2012 3:15 pm
Has thanked: 474 times
Been thanked: 458 times
Contact:

Re: LED Matrix Module

Post by dazz »

HI Stu
It's probably because John using a pre upgrade version(testing version of the upcoming patch) of v6, try importing the V5 version

Regards
Dazz
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: LED Matrix Module

Post by acestu »

Hi Dazz,

I have just told John in a PM that this is the same problem that you and I had the other day.....

cheers
Stu
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: LED Matrix Module

Post by acestu »

Hi John,

I have just picked a few of these up with built in shift register, not sure how to use them though....
LED-Matrix.png
(321.92 KiB) Downloaded 15212 times
cheers
Stuart
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

User avatar
JohnCrow
Valued Contributor
Valued Contributor
Posts: 1367
Joined: Wed Sep 19, 2007 1:21 pm
Location: Lincolnshire
Has thanked: 364 times
Been thanked: 716 times
Contact:

Re: LED Matrix Module

Post by JohnCrow »

Hi Stuart
Looking at the photo without the data sheet
My thoughts are
1 The number on the DIN (Data In?) line that sets the LEDS on
2 Suspect the CS line selects the Vertical row (same as point 1) using binary
3 Then pull CLK high or low to send the data

Where did you find them?
1 in 10 people understand binary, the other one doesn't !

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: LED Matrix Module

Post by acestu »

Hi John,

I am trying to get a datasheet for them, all I know is that the chip on the board is a MAX7219 which I beleive is an LED driver chip, I will see what happens this week because the Chinese are on national holidays....

cheers
Stuart

P.S. They are on EBAY here: http://www.ebay.co.uk/itm/300975480543? ... 1439.l2649
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: LED Matrix Module

Post by medelec35 »

Hi Stuart
While you waiting for the datasheet on the product, you can get an idea from the datasheet of the MAX721 driver:
http://datasheets.maximintegrated.com/e ... AX7221.pdf

Martin
Martin

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: LED Matrix Module

Post by acestu »

Hi Martin,

Thanks, I have the datasheet for the Max7219, I am waiting to see if I can get a datasheet for the actual board because it has some more components underneath the matrix and it may have some examples with it...

cheers
Stuart
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

Spanish_dude
Posts: 594
Joined: Thu Sep 17, 2009 7:52 am
Location: Belgium
Has thanked: 63 times
Been thanked: 102 times
Contact:

Re: LED Matrix Module

Post by Spanish_dude »

http://datasheets.maximintegrated.com/e ... AX7221.pdf

The MAX7219 has a 16 bit register which is used to set or clear the LEDs.
You write in that register by setting or clearing your DIN and then having a rising edge on the CLK pin. CS has to be low.
Each time there's a rising edge, the register will be shifted right.

There's some configuration at start-up you have to do.
At start-up, the IC is in shutdown mode. You have to leave it in this mode and configure it before changing it to normal mode.

The MAX7219 has a built in BCD to 7 segment decoder, which has to be disabled (I think it's enabled at start-up).
To disable the decoder you want to send the following value: 0x09 << 8 | 0x00 (See p.7).

You can also set the brightness of the LEDs by sending : 0x0A << 8 | brightness_low_nibble (See p. 9).
The brightness is set by using the lower nibble of a byte.

One last thing before setting it to normal mode is telling the IC how many displays you have, or in this case, how many rows/columns.
Because it's an 8x8 LED matrix you can send this value : 0x0B << 8 | 0x07 (See p. 9).

Now, to set it to normal mode you have to send the following value: 0x0C << 8 | 0x01 (See p.7).

You should be able to send the data for the LEDs now. That's done by sending : row << 8 | column (See p. 7).
The row starts from 1 to 8 and the column is an 8 bit value which sets or clears the LEDs.

- Nicolas

PS: The MAX7219 has a DOUT, but I don't see it on your PCB. That's a shame, you could have simply cascaded the LED matrixes to make one big/long LED matrix.

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: LED Matrix Module

Post by acestu »

Hi Nicolas,

Thanks for the info, the board does have a DOUT as per pic, I want to connect 4 or 5 togethor side by side and make a scrolling sign....
Matrix-board.JPG
(195.85 KiB) Downloaded 9037 times
cheers
Acestu

P.S. That is not a crisp under my control key
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

Spanish_dude
Posts: 594
Joined: Thu Sep 17, 2009 7:52 am
Location: Belgium
Has thanked: 63 times
Been thanked: 102 times
Contact:

Re: LED Matrix Module

Post by Spanish_dude »

Didn't see those pins underneath the LED matrix, nice :D.

- Nicolas

User avatar
STibor
Posts: 263
Joined: Fri Dec 16, 2011 3:20 pm
Has thanked: 116 times
Been thanked: 113 times
Contact:

Re: LED Matrix Module

Post by STibor »

Hi,

Hello
Here is one example of display.
http://www.matrixmultimedia.com/mmforum ... rix#p56874
I attach an example of four display.
Do you have any ideas for scrolling your characters?

Post Reply