Hi,
Why don´t you use the M32 built in SPI periferal?
***
The MAX7219 has a CS* pin. Is that your "LOAD"?
If so, then you misunderstood the function. It should be all the time high (idle).
Before starting communication you set it low.
After communcation is finished you set it high(Idle).
--> No need to set it low again. In the datatsheet you see the low pulse only to specify the min. idle time before a new communication is started.
***
I don´t know if this works. The result is a 16 bit value. But DIN is a boolean value. But i´m not familiar with the C expressions.
***
Code:
while(1)
{
update7219();
}
}
This means the display is continously updateed without the change to "breath". You know what i mean. An update ever 300ms is enough. So a "wait for 300ms" between two updates is a good idea.
***
#define INTENSITY 0b0000101000000000
This sets minimum brightness. Maybe this is too low. Check on this.
***
#define SCANLIMIT 0b0000101100000011
This sets 4 digits to be updatet, but you say you have only two digits. Check on this.
***
send16(DIG0 | returnletter(2));//print '2' to digit 0
send16(INTENSITY | 0x0F);//Put on FULL intensity "1111"
"INTENSITY" is a 16 bit value, but "0x0F" is an 8 bit value. Is this correct C code?
The same is with "DIG0" and "returnletter(2)"
***
Please edit you post, because your attachment is within the "code" tags
***
Klaus