Hello Arduino forum,
Using Arduino and Max 7219 to control 256 LEDs in a linear display.
The desired effect is indicated in this animated GIF.
(The animated GIF show 157 green LEDs. The complete 256 were not
animated in the interest of time because this indicates the idea.)
A Max 7219 controls 64 LEDs on a PCB. Four boards are planned.
Have successfully connected two PCBs and have 128 light working
correctly.
The problem came when connecting the third board. Have connected the first
eight LEDs on the third board. They will not come on.
Checked the software and hardware over and over. Finally went back to the software
and found in the code when the line
LedControl lc=LedControl(12,11,10,3);
is changed to
LedControl lc=LedControl(12,11,10,2);
(more complete copy of sketch listed herewith below)
the LEDs on the third board light simultaneously
with first eight LEDs on the second board.
The fourth value in the LEDControl argument according to
https://playground.arduino.cc/Main/LedControl/#SingleMatrixControl
controls the number of Maxim 7219s in the daisy chain.
When the value is changes from 3 to 2 the ICs think there are
two ICs and turns on the LEDs on the third board. This proves
that the voltage the Clock and the Load are correct.
But can't figure out if there are three boards why, when
the third board is connected the third board will not working.
When connecting the second board had trouble because it was not realized that
lc.shutdown(1,false); line had to be added. Also it is believed
that the setIntensity values has to be set for each board
although there is not much literature on these values.
Any idea why the third board LEDs won't go positive?
Thanks.
Allen in Dallas
//Sketch begin third board
#include "LedControl.h"
LedControl lc=LedControl(12,11,10,3);
unsigned long delaytime=500;
unsigned long delaytime2=70;
void setup() {
lc.shutdown(0,false);
lc.shutdown(1,false); //second board
lc.shutdown(2,false); //third board
/* Set the brightness to a medium values /
lc.setIntensity(0,6);
lc.setIntensity(1,6);
lc.setIntensity(2,6);
/ and clear the display */
lc.clearDisplay(0);
lc.clearDisplay(1);
lc.clearDisplay(2);
}
void loop() {
lc.setLed(0,0,0,true); //first octect
delay(delaytime2);
lc.setLed(0,0,1,true);
delay(delaytime2);
.....