Go Down

Topic: Can I Read/Write a standard SDcard(in a card reader)via the DUE Native USB port? (Read 1 time) previous topic - next topic

paseman

If so, how?
I wouldn't need to add a shield then....
- Thanks

jtw11

#1
Sep 15, 2013, 12:42 am Last Edit: Sep 15, 2013, 12:45 am by jtw11 Reason: 1
Not really, no - SD cards don't use USB for communication. <--- this is the important bit.

They use either SPI (a 3 +n wire data bus [where n = the number of SPI nodes on the bus]) or the full number of data pins on the card.

The SAM3X8E chip has a dedicated memory interface to deal with SD cards, that uses the data pins on a card. Or of course you can just use SPI - there are libraries for this, although I'm not sure they're supported by the Due yet.

paseman

Actually, this was poorly phrased.
I can buy a whole host of SD card reader/writers to connect an SD card via USB my Mac for cheap.
http://www.frys.com/search?search_type=regular&sqxts=1&query_string=sd+card+usb&submit.x=-410&submit.y=-151&cat=0
So some sort of USB/SDcard interface is going on there.
And I see that the Due has a USB interface as well.
can I make the DUE<->USB<->USB/SDcardReader<->SDcard path work via software, or do I need an SDcard shield?

Palliser

Hello paseman,
You can read/write from/to a SDcard via the Due Native USB port. I've done that using the Atmel AS6 ASF example called "USB Host MSC FatFS", with a card reader and a 1.0GB SDcard (FAT).
http://www.frys.com/product/5815313

It also worked with a Flash pen drive:
http://www.radioshack.com/product/index.jsp?productId=12918022

I believe that it doesn't matter the SDcard or Flash card you use. I have tested the code only with one memory device at a time. The only problem with this application is that, AFAIK, there is no ported code from Atmel Studio to Arduino. It is not hard to do it.

I started a thread some time ago:
http://forum.arduino.cc/index.php?topic=135218.msg1016939#msg1016939
I hope this help. Regards!


jtw11

Ah, I see what you mean now - yes, as Palliser has said, this is possible.

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy