"There are suspicions that the SPI.transfer does not operate within the "for" loop (also in case for(int i=7;i<0; i=i-1) ) ."
It does. For example:
digitalWrite (ssPin, LOW);
for (x=0; x<8, x=x+1){
SPI.transfer(dataArray[x]); // transfer 8 bits of data
}
digitalWrite (ssPin, HIGH);
Whether it works after your unions and
SPI.transfer (l.b[4]);
type formats, I don't know.
Also,
ultra long long xArray[42] ={...............}; // 40 of 64bit words <<< (comment does not match, should be 42)
I haven't seen data type 'ultra long long' before, is that 64 bits?
If so, that array will be 42 x 8 bytes long = 336 bytes of memory.
Is this intended to be a function? It only declares the variable z and the array bytez1. Why not just have them in the area before setup() with the other variables? No comments, so no idea what is intended.
You have same union MatrixData name 3 or 4 times, they need to be unique if these are function calls.
union MatrixData
{
unsigned long long z;
byte z1[8];
};