Controlling 4 digit 7 segment display with Max7219 module

I am planning to build a clock with custom made seven segment displays.
I am working on a prototype using the 4 digit 7 segment module.
I have connected it as follows (see attached)
I can write the code to display digits segment by segment but I really wanted to use ledcontrol library
e.g

    lc.setDigit(0,3,1,false);
    lc.setDigit(0,3,2,false);
    lc.setDigit(0,3,3,false);
    lc.setDigit(0,3,4,false);
    lc.setDigit(0,3,5,false);
    lc.setDigit(0,3,6,false);
    lc.setDigit(0,3,7,false);
    lc.setDigit(0,3,8,false);

Which should write digits 1-8 in the last position.
I get gibrish though so clearly the pin mapping should be different but I am trying many things and I cannot
identyfy the mapping required by this library

Please help

you can either study the 3 datasheets (your MAX-Module module, the MAX Datasheet itself, your LED Module) or do some kind of reverse engineering:

My approach would be:

identify the dot/comma
print 8 - the dp must not be lighted
print 9 and bring the non en-lighted segment to the right position --> you got clearly the E Segment
print 6 - bring B to the right position
print 1 - now you have two possibilities - but you know already what B is, so the other one is C
print 7 - from 1 you know B and C, the third will be A
and so on.

imho not so hard at all

I will spent some time on this tonight. The thing is that I did some reverse engeeniring I thought that I had cracked it. I run the library demo and I still get jibrish.
I will follow your advice. I also have option of printing characters so "r" nad"i" will help me to pin point individual segments connectivity. I will update this when I get stuck

Is that a common cathode display? Can't tell from what is shown.
Post the code that writes to the display.

Have you buzzed the board to confirm Rx connects to the MAX7219 digit pins and Cx connects to the segment pins?

Once you have, you can more simply write a digit to each register:

digitalWrite (cs, LOW);
SPI.transfer (register Address); // 1 to 8
SPI.transfer (numberToDisplay);
digitalWrite (cs, HIGH);

Max7219 offers built-in decoding for 0,1,2,3,4,5,6,7,8,9,H,E,L,P,-
There are 5 control registers, load them in setup(), including DecodeMode (decode for the above, or no decoding, use your own font lookup table).

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.