I have a short trial sketch - total mess. Basically a simple loading from and SD card routine. Using SD.h library.
If I load it to the UNO, and plug in the ethernet shield, all is well. It immediately finds the sd card and reads the txt file etc from it. No problems.
But, the UNO is way short on programming space, so it needs to be a Mega.
If I plug it directly in the Mega, it just cannot find that sd card.
I disable the ethernet shield with
pinMode(10, OUTPUT); //Disable Ethernet chip
I have tried switching pin 4 (sd card enable) low.. but that doesn't help.
Removed the 6 pin ICSP header from the ethernet shield and jumpered Miso, Mosi and Sck over to pins 50,51,52 (As mentioned in many other posts). No avail.
Tried pin 53 and chip select (apparently this must be left as an output). No further forward.
All other pins are an identical match. I have exhausted Google on this one (many people have the same issue, and it's usually because they don't disable the ethernet card).
Tested pin to pin - just to make sure its not a dodgy pin connection. All ok
So, I am assuming this is something to do with the SD.h library? When it detects its a Mega, is it defining some pin that I do not know about?
Where would I find such information in the SD.h folder?
Any help would be great. Thanks