Hello
I have a fairly large PCB, with 5x Max7219's onboard, driving 5x rows of 8, seven segment displays.
Using the 'LedControl.h' library. All going fine.
At first, I daisy chained the 5x Max7219's together. Data out to the following ones data in.
They all shared the same clock and the same load line.
Declared below:
LedControl lc=LedControl(5,4,3,5); // Data, CLK, Load and number of IC's
This worked fine on the breadboard during testing.
But...
When transferred to the (probably noisy) pcb, I have data corruption issues over time.
I have smoothed the supply as best I can, but talking to the last IC sometimes corrupts the earlier chips.
So, I though I have more than enough pins and programming space, I will talk to each IC individually.
So I declared:
LedControl lc1=LedControl(5,4,3,1);
LedControl lc2=LedControl(6,4,3,1);
LedControl lc3=LedControl(7,4,3,1);
LedControl lc4=LedControl(8,4,3,1);
LedControl lc5=LedControl(9,4,3,1);
Individual Data lines, everything else shared.
Doesn't work? I just get all the segments illuminated (so bad/no data).
But, if I declare:
LedControl lc1=LedControl(5,4,3,1);
LedControl lc2=LedControl(7,6,3,1);
LedControl lc3=LedControl(9,8,3,1);
LedControl lc4=LedControl(11,10,3,1);
LedControl lc5=LedControl(13,12,3,1);
Then it appears to work.
Just wondered why I have to give each display its own CLK as well? All the diagrams I have found show them shared.
Is it a library thing maybe?