Beware devices which are "sort of SPI" but disobey some of the protocol. MISO must only be driven when the chip is selected, MOSI must be ignored except when chip is selected and clock is pulsed. Thinks get a little complex if you need to drive different devices at different clock speeds or want to use SPI transfers in an interrupt routine...
High again and thanks for answering. Back with new data:
1) I have changed the default SS pin from 53 to 48 and 49 respectively for the 2 SPI shields through the libraries
My connections are the following:
Ground: Arduino Mega2560,
Level 1: Arduino Ethernet Shield V1.1
Top lvl : Micro Sd shield from Sparkfun
Pins 10-13 of the Ethernet shield are not connected to the Arduino Mega (solder and pins have been removed), so pins 10-13 of the shield are in contact with pins 10-13 of the sd card and they are wired with pins 49,51,50,52 on the mega
Pin 8 from the sd shield is bended and is not in contact with the Ethernet shield. It is connected with wires to pin 48 in the mega. Pins 10-13 are sent to mega as previously mentioned.
2) I have uploaded the EthershieldDNSTest code and the Ethernet shield works great (with the SD shield above)
3) I have uploaded the QuickStart code from the SdFat library and the SD does not initialize when the Ethernet shield is under it. Without the Ethernet shield the SD card works perfectly
In both codes I add in the setup that pin 53 is an output and that it is set as High
You mentioned something about "sort of SPI" devices. Is one of these?
Do you have any idea about what might be going wrong?