AVR Dual RGB Matrix Driver

Multiplexing LEDs can be tricky, but we’re working with RGB LEDs, so think of each RGB as three individual LEDs. For an 8 x 8 matrix, that is 192 total LEDs on a single matrix. Even though there are only 32 connection pins, it is still possible to individually control the color and brightness of every single LED.
AVR Dual RGB Matrix Drive
Take a look at this diagram from the datasheet for the RGB Matrix I am using.You should see that each “row” shares a common anode. Similarly, each column (of each color LED) shares a common cathode. To drive just a single LED, we will drive its shared anode HI and its cathode LO. To control the color of each individual LED, we will have to do some low level multiplexing.
There are eight rows of common anodes, so each row will only be on (powered) for 1/8th of the time. The trick is to switch between which row is on so fast that a human eye cannot detect it. In this way, the pins driving the LED cathodes will only control one row of LEDs at a time. As the active row is switched, new values for the cathode lines will have to be loaded.

It was impossible to tell what pin was what just by looking on the matrices that I got. It is also unknown if the pin numbering wraps around the matrix in the same way that pins are numbered on an IC. The only real way to know is by applying voltages to a few pins until you see a pattern.
Using the schematic in the previous step, we can try to illuminate a single LED. If a positive voltage is applied to pin 17 with a negative applied to pin 1, the blue LED of row 1, column 1, should turn on.
AVR Dual RGB Matri
DO NOT APPLY DIRECT BATTERY VOLTAGES TO THE PINS. Always use an inline current limiting resistor. A 10k resistor and 9V battery will work fine.
If the pin numbering is similar to that of an IC, pins 1 and 17 will be in opposite corners, if not, they will be directly across from each other.
Once you think you have found this single blue LED, test your findings by trying to turn on a few other random LEDs. Once you have the pin numbering down, be sure to mark pin 1!
I preferred to plug the matrix across two vertical breadboards for development; however, this meant my rows were actually columns. Because of this, I refer to the “rows” of the datasheet as “columns.” I also start counting from 0 instead of 1, as in common in low-level control.

For more detail:  AVR Dual RGB Matrix Driver


About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top