Pages: [1]   Go Down
Author Topic: Can I Read/Write a standard SDcard(in a card reader)via the DUE Native USB port?  (Read 1266 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 15
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If so, how?
I wouldn't need to add a shield then....
- Thanks
« Last Edit: September 14, 2013, 06:58:46 pm by paseman » Logged

UK
Offline Offline
God Member
*****
Karma: 1
Posts: 530
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: September 14, 2013, 05:45:33 pm by jtw11 » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 15
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
« Last Edit: September 14, 2013, 07:00:03 pm by paseman » Logged

Venezuela
Offline Offline
Sr. Member
****
Karma: 16
Posts: 495
Ground.......ground........always ground
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 15
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

helps a lot!
Thanks.
Logged

UK
Offline Offline
God Member
*****
Karma: 1
Posts: 530
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Pages: [1]   Go Up
Jump to: