Close

Troubleshooting the problem - part 2

A project log for MAX7219 8x8 LED module clone

The FC-16 module is a common 8x8 LED matrix utilising the MAX7219. This project is a DIY clone.

stephen-gStephen G 02/15/2024 at 11:400 Comments

After realising that I'd mixed up the rows and columns of the matrix, I still wanted to verify that once that was fixed, then everything would work. This wasn't too hard to test - I just needed to put the matrix in a breadboard, and then connect that with jumpers to the socket on my PCB. For example, pin 1 on the matrix, which is the cathode for row 5, needs to be connected to pin 6 on the PCB socket, because that is the pin that controls column 5. And vice versa - pin 6 on the matrix needs to connect to pin 1 on the PCB socket. After connecting up the 8 pairs of pins in this manner, I turned on my test circuit again - and there was good and bad news.
The good news was that I was indeed individually controlling the LEDs the way I expected. However the bad news was that I had once again missed a crucial detail in the datasheet. On the bottom left of page 8, it shows that the most significant bit of the register controls the DP line. I had connected the DP line to the right-most column of the matrix, meaning that when a wrote a byte to one of the MAX7219 registers, the bits were displayed out of order. The bits were displayed in the order 65432107, and everthing needed to move one column to the right. This could be corrected in software by shifting the bits around before writing them to the MAX7219, but given I already needed to do a new version of the PCB, I wanted to fix it properly.


So I mapped out the jumper connections needed to get a 100% working display on my current PCB:
MAX7219 SEG_DP pin -> currently connected to pin 5 of PCB socket -> this is row 8 -> swap to col 8 -> shift to col 1 -> pin 13 of matrix
So a jumper goes from pin 5 of the PCB socket to pin 13 of the display.
MAX7219 SEG_A pin -> currently connected to pin 9 of PCB socket -> this is row 1 -> swap to col 1 -> shift to col 2 -> pin 3 of matrix
Jumper from pin 9 of socket to pin 3 of the matrix.
SEG_B -> pin 14 -> row 2 -> col 2 -> col 3 -> pin 4
etc.

After rewiring the affected jumpers, the display started working perfectly.
So the lesson here is - read the datasheet... and then read it again! And don't assume ANYTHING. I have a revision B board ready for fabrication now and will send it along with another board I'm working on.

Discussions