Max7219 / 7 Segments 2 digits

Hello folks,

I'm posting - yet another - topic about the great Max7219.
I just moved out and found a box of old 7 Segments 2 digits which I want to control using the Max7219.

After following this post and made sure I didn't make any mistake ( :smiley: ), everything's dark, nothing displayed at all.

I suspect my LEDs are the problem, as my code is quite simple (I just setup LedControl and tried to turn 2 and then 1 digit) and I can't actually find the right datasheet.

The model is LD-5261as, and I really couldn't find anything really convincing.
Here's the first datasheet I found: 5261AS

However, when I give it a go and try to display "8" on one digit, both digits light up and only segments A and F are lit.

After a bit of trial and error, it seems the display match this datasheet: KYX-5261AS - and would explain why only segments A and F are lit with the previous setup.

But then, when I plug everything according to this second datasheet, pitch black, nothing.

Here's an example of the most basic code I've been trying to use for reference:

#include "LedControl.h"

LedControl lc=LedControl(12,11,10,1);

void setup() {
  lc.shutdown(0,false);
  lc.setIntensity(0,8);
  lc.clearDisplay(0);
}

void loop() { 
  lc.setDigit(0,0,8,true);
  lc.setDigit(0,1,8,false);
}

So here's my question, what could be wrong ? I can't get my head around it, if it's not the displays I'm out of ideas :smiley:

I'll post a picture of my setup if needed.
PS: I used a 47KOhm resistor.

Cheers !

47 Kohm resistor for what?

I’m guessing the overall current limiting. I usually use 10K.

Have you established if your displays are common anode or common cathode?

Have you tested all the segments individually, by hand?

If not, use a low value series resistor, e.g. 220R or 330R. Connect it from one of the digit/common pins to ground. Then probe each of the segment pins with 5V. If any segments light, the display is common cathode. If none light, connect the resistor to 5V instead of ground and probe the segment pins with 0V. If they light, the display is common anode. Check each segment and then move the resistor to the other digit pin and repeat.

Thanks for your quick replies guys, sorry I couldn’t be as fast !

So yeah, I used a 47K resistor as a safety, a 10K would do the job too.

I’m testing tonight, but I’m afraid the displays might be CA …

jojocaster:
I’m afraid the displays might be CA …

MAX7219 can be used with CA. Its not as convenient…

  • You have to switch digit decoding off and have digit patterns in your code
  • You cannot reduce the “scan limit” to maximise the brightness of the displays, because you need the chip to scan all 8 “digits” to light all your segments
  • You have to update all 8 digit registers in the chip to change one digit on the display
  • You have to do some tricky bit-manipulation in the code…but it can be done.

That’s what I thought, but as I was pretty sure to have CC displays I thought I’d ask first.

So I’m even more confused now, I managed to get different displays (DC56-11SYKWA) which are CC - and have a proper datasheet ! :smiley:

But still the same issue. I rewired everything a few times, checked everything I could, and still pitch black.

And again, switching one of the digit pin with one segment lights it up, so it seems that it is somehow inverted but I can’t figure out why.

To make it a bit more clear, I plugged the pin 13 of the display on pin 10, and the segment b went on.

Any idea of what I could’ve done wrong ? :slight_smile:

One more thing, as I was looking for a solution online, I ran into this.

And here's a photo of the ones I have:

Funny coincidence or bad luck ? :smiley:

This is how you post a link on this forum.

And this is how you post a picture:

I have used many clone max7219 chips that look like yours and I have never had a problem with them, and I have spoken to many others who say the same. But I have also heard that they can be faulty, so it's not impossible you have a faulty chip, but unlikely.

Post a schematic showing how you connected it up (not someone else's schematic, draw your own, pencil & paper is ok). Also post close-up, well-focussed, well-lit pictures of your circuit so every wire can be followed.

Also please confirm you have followed my test instructions from post #3 with the display you are using, to prove they truly are CC and the are no faulty segments.

Thanks Paul, I just edited the post - kind of trickier to format it correctly on mobile.

I did the test, and all segments light up, so it is a CC ! That's a start.

I'll draw a schematic of my current setup asap, take photos and post everything here.

Thanks for your help :slight_smile:

Me again, sorry for the delay.

I finally worked it out. My connections were fine, my mistake was to plug the capacitors too far from the 5V and the ground. Moving the cables closer to the source fixed it.

It might also be worth mentioning that the on the first try, both digits flashed for a second and went blank again.
My second mistake was to test with a 10K resistor. Using 51K resistor was the solution (I'm using displays with an optimal Forward Voltage of 2V, and a DC forward current of 20mA).

Hope this helps someone, it took me way too long to solve this - but finally, it's all fine.

Thanks guys ! :slight_smile: