Thanks for the response. I have already try it, without sucess.
In SPI.cpp, there is the code for init:
void SPIClass::begin() {
// Set direction register for SCK and MOSI pin.
// MISO pin automatically overrides to INPUT.
// When the SS pin is set as OUTPUT, it can be used as
// a general purpose output port (it doesn't influence
// SPI operations).
pinMode(SCK, OUTPUT);
pinMode(MOSI, OUTPUT);
pinMode(SS, OUTPUT);
digitalWrite(SCK, LOW);
digitalWrite(MOSI, LOW);
digitalWrite(SS, HIGH);
// Warning: if the SS pin ever becomes a LOW INPUT then SPI
// automatically switches to Slave, so the data direction of
// the SS pin MUST be kept as OUTPUT.
SPCR |= _BV(MSTR);
SPCR |= _BV(SPE);
}
So, you could see that SS is already declared, and set to output.
I have see that if I used SPI_CLOCK_DIV16 the output is "F8" and sometimes "FC", and if I used SPI_CLOCK_DIV8 or less, the output stuck at "0". So I conclude to a timing problem, perhaps caused by the lenght of the jump wires ?????
I have to find a oscilloscope in order to see the waveform.
Do you think that the code is correct ? if yes, I will check the timing and the hardware.