Mega 2560 & adafruit micro SD

I am trying to connect my mega 2560 to the adafruit micro SD breakout board listed under the SDCardNotes on the arduino homepage ( to log flight data. As directed on the same page I have the pin connections as follows:

5V to 5V GND to GND CLK to 52 DO to 51 DI to 50 CS to 53

the 3V and CD pins are left unconnected

I've originally tried running the SD RearWrite example code ( but with two changes: A) changed pin 4 to pin 53 since that's the CS connection I'm using B) deleted the pinMode(10,OUTPUT) since that line was intended for a different board

I've also tried leaving pin 53 as an output in the code as a substitute for pin 10 and connecting CS to another pin (38)

the micro SD cards I've tried are

Samsung 2GB kingston 1GS SanDisk SHDC 2,4, and 8GB

from reading other topics I'm told the kingston and the SanDisk SHDCs do not work however I haven't seen anything about the samsung.

Any help would be appreciated. Thanks

For your setup, the Arduino is master and the card is slave. DO on the card is slave out and DI is slave in.


DO --> MISO --> pin 50 (MISO is master in slave out) DI --> MOSI --> pin 51 (MOSI is master out slave in)

Other pins stay the way you have them.

I have good luck with Kingston SDHC and standard size micoSD cards. The SanDisk should also work. I have not tried Samsung.

You are Godsend...worked great...Thanks!