soon,
My main goal was to help you get your matrix to work. I have modified your code and made a video to show it working. Unfortunately, I have failed to help you get it working on your hardware. (I really think you have a wiring problem.)
Now you think you have a "work around" and also have more questions about fonts in EEPROM, etc. For those questions, I suggest that you start a new thread so that you can get help from others here too.
(If I were you I would get the matrix working before trying to add these things - "step by step")
I have included your modified code below in case that helps.
#define ISR_FREQ 190 //190=650Hz
#define GREEN 1 // Green MAX72xx
#define RED 0 // Red MAX72xx
int maxInShutdown=GREEN; // MAX7221 that is currently off
// ADDED ALL THE ABOVE
#include "LedControl.h"
// (NOT NEEDED IF Rel. 0013)
#undef int
#undef abs
#undef double
#undef float
#undef round
LedControl lc=LedControl(12,11,10,2); // YOUR HARDWARE
//LedControl lc=LedControl(10,9,8,2); // MY HARDWARE
// red = 0, green = 1;
// pin 12 = data in, pin 11 = clock, pin 10 = load
/* we always wait a bit between updates of the display */
unsigned long delaytime=200;
void setup() {
lc.setIntensity(GREEN,15); // 0 = dim, 15 = full brightness
lc.setIntensity(RED,12); // red needs less brightness
setISRtimer(); // setup the timer
startISR(); // start the timer to toggle shutdown
// ADDED THE ABOVE
// COMMENTED OUT BELOW
//we have already set the number of devices when we created the LedControl
//int devices=lc.getDeviceCount();
//we have to init all devices in a loop
//for(int address=0;address<devices;address++) {
/*The MAX72XX is in power-saving mode on startup*/
//lc.shutdown(address,false);
/* Set the brightness to a medium values */
//lc.setIntensity(address,8);
ClearMatrix();
// }
}
// row and col starts w/ 0. (0, row, col, true/false)
void clock_12_0() {
ClearMatrix();
SetLed(1,0,3,true); //freq REPLACED ALL "lc.setLed" WITH "SetLed"
SetLed(1,0,4,true); //freq
for(int row=3;row>0;row--) {
delay(delaytime);
SetLed(0,row,3,true);
SetLed(0,row,4,true);
delay(delaytime);
SetLed(0,row,3,false);
SetLed(0,row,4,false);
}
for(int row=1;row<3;row++) {
delay(delaytime);
SetLed(0,row,3,true);
SetLed(0,row,4,true);
delay(delaytime);
SetLed(0,row,3,false);
SetLed(0,row,4,false);
}
for(int row=3;row>0;row--) {
delay(delaytime);
SetLed(0,row,3,true);
SetLed(0,row,4,true);
delay(delaytime*4);
}
delay(delaytime*10);
}
void clock_12_1() {
ClearMatrix();
SetLed(1,0,3,true); //freq
SetLed(1,0,4,true); //freq
delay(delaytime*2);
SetLed(1,1,2,true); //freq
SetLed(1,1,5,true); //freq
for(int row=3;row>0;row--) {
delay(delaytime);
SetLed(0,row,3,true);
SetLed(0,row,4,true);
delay(delaytime);
SetLed(0,row,3,false);
SetLed(0,row,4,false);
}
for(int row=1;row<3;row++) {
delay(delaytime);
SetLed(0,row,3,true);
SetLed(0,row,4,true);
delay(delaytime);
SetLed(0,row,3,false);
SetLed(0,row,4,false);
}
for(int row=3;row>0;row--) {
delay(delaytime);
SetLed(0,row,3,true);
SetLed(0,row,4,true);
delay(delaytime*4);
}
delay(delaytime*10);
}
void clock_12_2() {
ClearMatrix();
SetLed(1,0,3,true); //freq
SetLed(1,0,4,true); //freq
delay(delaytime*2);
SetLed(1,1,2,true); //freq
SetLed(1,1,5,true); //freq
delay(delaytime*2);
SetLed(1,2,1,true); //freq
SetLed(1,2,6,true); //freq
for(int row=3;row>0;row--) {
delay(delaytime);
SetLed(0,row,3,true);
SetLed(0,row,4,true);
delay(delaytime);
SetLed(0,row,3,false);
SetLed(0,row,4,false);
}
for(int row=1;row<3;row++) {
delay(delaytime);
SetLed(0,row,3,true);
SetLed(0,row,4,true);
delay(delaytime);
SetLed(0,row,3,false);
SetLed(0,row,4,false);
}
for(int row=3;row>0;row--) {
delay(delaytime);
SetLed(0,row,3,true);
SetLed(0,row,4,true);
delay(delaytime*4);
}
delay(delaytime*10);
}
void clock_12_3() {
ClearMatrix();
SetLed(1,0,3,true); //freq
SetLed(1,0,4,true); //freq
delay(delaytime*2);
SetLed(1,1,2,true); //freq
SetLed(1,1,5,true); //freq
delay(delaytime*2);
SetLed(1,2,1,true); //freq
SetLed(1,2,6,true); //freq
delay(delaytime*2);
SetLed(1,3,0,true); //freq
SetLed(1,3,7,true); //freq
for(int row=3;row>0;row--) {
delay(delaytime);
SetLed(0,row,3,true);
SetLed(0,row,4,true);
delay(delaytime);
SetLed(0,row,3,false);
SetLed(0,row,4,false);
}
for(int row=1;row<3;row++) {
delay(delaytime);
SetLed(0,row,3,true);
SetLed(0,row,4,true);
delay(delaytime);
SetLed(0,row,3,false);
SetLed(0,row,4,false);
}
for(int row=3;row>0;row--) {
delay(delaytime);
SetLed(0,row,3,true);
SetLed(0,row,4,true);
delay(delaytime*4);
}
delay(delaytime*10);
}
void loop() {
clock_12_0() ;
clock_12_1();
clock_12_2();
clock_12_3();
}
/* REPLACED THIS FUNC
void ClearMatrix(){
lc.clearDisplay(0);
lc.clearDisplay(1);
}
*/
// ADDED EVERYTHING BELOW
/////////////////////////////ISR Timer Functions ///////////////////////////
ISR(TIMER2_COMPA_vect) { //This ISR toggles shutdown between the 2MAX7221's
if(maxInShutdown==RED){
lc.shutdown(GREEN,true); // The order here is critical - Shutdown first!
lc.shutdown(RED,false); // . . . Then restart the other.
maxInShutdown=GREEN;
}
else {
lc.shutdown(RED,true);
lc.shutdown(GREEN,false);
maxInShutdown=RED;
}
}
void setISRtimer(){ // setup ISR timer controling toggleing
TCCR2A = 0x02; // WGM22=0 + WGM21=1 + WGM20=0 = Mode2 (CTC)
TCCR2B = 0x05; // CS22=1 + CS21=0 + CS20=1 = /128 prescaler (125kHz)
TCNT2 = 0; // clear counter
OCR2A = ISR_FREQ; // set TOP (divisor) - see #define
}
void startISR(){ // Starts the ISR
TCNT2 = 0; // clear counter (needed here also)
TIMSK2|=(1<<OCIE2A); // set interrupts=enabled (calls ISR(TIMER2_COMPA_vect)
}
void stopISR(){ // Stops the ISR
TIMSK2&=~(1<<OCIE2A); // disable interrupts
}
///////// Wrappers for LedControl functions . . . //////////
void SetLed(byte Color, byte Row,byte Col, byte State){
stopISR(); // disable interrupts - stop toggling shutdown when updating
lc.setLed(Color,Row,Col,State);
startISR(); // enable interrupts again
}
void SetRow(byte Color, byte Row, byte State){
stopISR(); // disable interrupts - stop toggling shutdown when updating
lc.setRow(Color,Row,State);
startISR(); // enable interrupts again
}
void SetColumn(byte Color, byte Col, byte State){
stopISR(); // disable interrupts - stop toggling shutdown when updating
lc.setColumn(Color,Col,State);
startISR(); // enable interrupts again
}
void ClearMatrix(){
stopISR(); // disable interrupts - stop toggling shutdown when updating
lc.clearDisplay(GREEN);
lc.clearDisplay(RED);
startISR(); // enable interrupts again
}
If you have seen the videos I made for you, please let me know so I can take them down.
I have tried to only use the sample code that you provided on SRI
Just curious what is SRI?