Go Down

### Topic: 8x8 matrix, model 788BS, trouble understanding the pin layout. (Read 592 times)previous topic - next topic

#### ron_sk

##### May 22, 2020, 06:09 pm
Hi All,

So in my learning of Arduino and programming, I'm at the stage where I'm learning about the 8x8 matrix and how to program it. I've looked at what came with my tutorial book and some examples online, and in general I understand the coding and how the hexadecimal, binary numbers get loaded into into each row and how the columns are turned on or off depending on the binary byte loaded. I got the matrix to work.

One thing I can't wrap my brain around though, no matter how long I stare at it, or how many websites I vist and videos I look at, is how the pins are designated as rows or columns and how people decide on how to hook-up their pins on the Arduino to the pins on the matrix.

Does anyone have any links to videos that actually provide a CLEAR explanation on this, or can someone provide some insight?. I looked at the schematic from the datasheet for this common anode matrix, and on one side it's numbered 1-8 as rows and the other side, 1-8 as columns. Then they are also numbered with different, out-of-sequence numbers. I looked at one simple setup online for a similar matrix with the same numbering, and the pins they consider as columns and the ones they consider as rows are not the same as in  another website. (?!?!)

Can the pins just be hooked up in any old way? . I would think that a specific pin on the matrix would always be for row 8, and another pin would always be column 2, etc...

Could someone PLEASE be able to explain this in simple terms? I hit a brick wall, trying to understand this. I just can't figure out the logic to how people are hooking up ther Arduino pins to the matrix.

I'm aware that there are ICs to make using the matrix easier, but I want to understand why this works first.

Many thanks,
Ron

#### Paul__B

#1
##### May 23, 2020, 12:55 am
You are referring to this diagram?

The pin numbers refer to the pins of the display itself which has eight pins on top and bottom.  The odd arrangement is not odd at all - it is arranged for convenience of the PCB connections between the pins and LEDs inside the display module.  The pins are numbered like this:

Noting that the writing is on the bottom surface of the display.

So to light the top left LED, you need to ground pin 9 of the display and provide 5 V via a 470 Ohm resistor to pin 13 of the display.

Now if you were to mount the display in a different orientation, you may exchange columns and rows and require a different arrangement again.

Hooking up Arduino pins direct to the matrix (and of course, with 1k5 resistors) is a major waste of time and not particularly educational.  The proper MAX7219 modules complete with displays are still - despite the doubling in price for Covid-19 - comparatively cheap on eBay.

#### ron_sk

#2
##### May 23, 2020, 01:42 am
Hi Paul, thanks so much for the reply,

I guess trying to figure out how the connections are done is a futile waste of time, It would just be nice to understand why particular websites choose to hookup their Arduino pins to  certain matrix pins.

It would seemlogial that all the columns would be on one side, and all the rows would be on the other, or at least, it would be better labelled as to what pin handles what (row or column) on the datasheet. It would seem logical that they would say, this particular pin will control this particular row or column, but they don't and diiferent websites using essentially the same 8x8 matrix use pins differently, so it's very confusing.

Ron

#### ron_sk

#3
##### May 23, 2020, 04:16 am
ok dude....so I just tried correlating the pins 1-8 on the matrix (bottom left to right) and the pins 9-16 (top right to left) to the datatsheet numbers (columns and rows) and then correlated them to the columns and rows on the sketches and circuit diagrams i"ve seen. It looks like they match up!

I don't know how I didn't see this before, I'm a little embarrased. But it is a good excercise to see how the setup is actually done before miving to an IC to control the LED.

I'd buy you a beer if I knew where you were

Ron

#### marco_c

#4
##### May 23, 2020, 07:20 am
Quote
It would just be nice to understand why particular websites choose to hookup their Arduino pins to  certain matrix pins.
Great question. The answer is ... because they can. I wrote this some time ago and some of the introductory info in it is relevant to your question. https://arduinoplusplus.wordpress.com/2017/04/14/parola-a-to-z-adapting-for-different-hardware/
Arduino Libraries https://github.com/MajicDesigns?tab=Repositories
Parola for Arduino https://github.com/MajicDesigns/Parola
Arduino++ blog https://arduinoplusplus.wordpress.com

#### Paul__B

#5
##### May 23, 2020, 08:55 am
It would seem logical that all the columns would be on one side, and all the rows would be on the other,
That is a frankly humorous suggestion!    You are essentially saying that components should be designed to make it easy for hobbyists like yourself to understand.

No, this is the Real World.    As I have explained above, the displays are engineered for practical reasons, specifically how the various parts fit together and can be connected on a circuit board.  The same is true for the structure of an IC and how it relates to the pinout, it is convenient for some ICs to have a row of pins in the correct order to represent a group function, but not others.

I am not sure just what sort of PCB is inside the display, you can certainly do a lot with a two layer PCB and I figure it must be, but even then if the columns corresponded directly with the pins in one row, it would be very difficult to route the row connections - which would terminate on the sides - to pins in the other row.  In the event, the connections have been figured out for the least number of crossings to alternate sides of the PCB and shortest diversions.  Bear in mind also that in these displays, the LED chips themselves are usually mounted directly to pad pairs on the PCB, making it more difficult if not impossible to route other connections between those two pads as you might do easily between the 1/10" "pins" of an encapsulated LED.

or at least, it would be better labelled as to what pin handles what (row or column) on the datasheet.
Have you actually a datasheet?  The pictures I posted are the more important part of the datasheet so that should not be so difficult.

It would seem logical that they would say, this particular pin will control this particular row or column, but they don't and different websites using essentially the same 8x8 matrix use pins differently, so it's very confusing.
As I explained, using Arduino pins to drive a matrix display is a basically fruitless exercise so it is really not surprising that there is no "right" way to do it and you find various "inventions" that someone tried before finding something more useful to do!

#### ron_sk

#6
##### May 23, 2020, 07:19 pm
Thanks Paul for the replies. yes, I did download the datatsheet.

In the end, using the pics you sent and the datasheet I have, I pieced it all together and now I see the logic in how people are connecting their Arduino pins to the matrix. I should have seen the logic before, but thanks for the help.

I'm just the type of guy who likes to figure things out the hard way, before using the easy way

Cheers!
Ron

Go Up