How to connect SD card reader to Arduino DUE - help needed

I have been using an Adafruit MicroSD card board on my arduino mega 2560 and it works good. I dont use the SPI plug but the pins on the side.

Hook up(mega 2560): 5V pin to the 5V pin on the Arduino GND pin to the GND pin on the Arduino CLK to pin 13 or 52 DO to pin 12 or 50 DI to pin 11 or 51 CS to pin 10 or 53

But this does not work on the DUE, how do I connect the correct pins on the DUE without using the SPI plug? There are shields in the way to connect to the SPI plug right now.

You can't using Adafruits software as it is not designed to run on the due.

Mark

What SD card software can I use then?

Kimlorentz:
I have been using an Adafruit MicroSD card board on my arduino mega 2560 and it works good.
I dont use the SPI plug but the pins on the side.

Hook up(mega 2560):
5V pin to the 5V pin on the Arduino
GND pin to the GND pin on the Arduino
CLK to pin 13 or 52
DO to pin 12 or 50
DI to pin 11 or 51
CS to pin 10 or 53

But this does not work on the DUE, how do I connect the correct pins on the DUE without using the SPI plug?
There are shields in the way to connect to the SPI plug right now.

Here you find the connections in the attached file if you want to connect other SD card slot for Due instead of using Arduinos SD shield. The SPI pins are broken out on the central 6-pin header of Arduino DUE board.

SD card pin connections.pdf (97.7 KB)

You need to use the spi pinheader. The spi is not connected to pin 13, 12, 11 and 10 as on the avr arduinos.

My friend Gaetan Ro recently answered this same question for me. Here's his blog post with some information: http://groovuino.blogspot.com/2013/04/lets-code-simple-sampler.html

He told me:

To connect the SD card : http://playground.arduino.cc/Learning/SDMMC http://arduino-info.wikispaces.com/SD-Cards

To read it, you can use SdFat lib : https://github.com/greiman/SdFat

If you're motivated you can look at my old code, but it's hard to understand as there are no comments : https://github.com/Gaetino/Groovuino/blob/master/samplerl.h

I haven't done it myself, but perhaps this will point you in the right direction.

Thank you, I will take a look at this. But need to find a way to connect to my SPI plug, got a shield in the way right now. :(