I am trying to build a 16x16 RGB LED matrix.
Or to be exact i already build it and now am trying to find out a good way to control it.
The matrix is divided into four 8x8 matrices to make it a bit easier.
My initial approach was to use 74HC959 shift registers to control the rows and columns.
The LEDs have a common cathode that i connected to NPN transistors (BC457B) which are activated with one of the shift registers to be able to multiplex through the rows.
The anodes are connected to three daisy chained shift registers, so i can light up the colors of each row at once. So each 8x8 segment needs just 4 shift registers.
To control all this i thought i can use a standalone Atmega328, so i wired one up, wrote a sketch for it and tried it out.
Since the whole wiring would take a lot of loose wires and more breadboards then i have i just hooked up one of the 8x8 segments and connected one color. But testing the sketch with a simple 1010101… pattern already showed that i have a lot of flickering.
Now i wonder if my sketch is just poor, the components i used are not fit for it or if it simply can’t be done this way.
Can anyone help me here ? I have attached the sketch i used so far.
(the sketch also seems to have a little bug, because the first two LEDs in each row are lit then i apply the 1010101… pattern, haven’t looked at that yet, but if anyone spots the error just yell)
I already looked at MAX7219 chips, but i don’t know if i could even use them. Either i use one of those for each color, so i need 3 per segment and 12 in total, but brings up the question if this would work at all since the LEDs have a common cathode. Or i could subdivide each segment in 4x4 matrices, so i need 4 chips per segment and 16 total but waste a lot of pins from each chip and brings up the question if i can properly send data to 16 chips.
matrixController74HC959.ino (9.04 KB)