Pages: 1 [2]   Go Down
Author Topic: 2 SD cards in parallel  (Read 5047 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Shannon Member
****
Karma: 200
Posts: 11672
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

No chance on SPI, you just have to control each separately with a unique CS line.  In native mode they can be paralleled because they have an addressing scheme which enables commands to be targeted at a single card only, but the only command that works truly in parallel is the ALL_SEND_CIS one which reads the addresses in a manner similar to the OneWire bus's SEARCH ROM command.

Not only is an SD card more complex than the Arduino, they're probably more powerful than early PCs!
Logged

[ I won't respond to messages, use the forum please ]

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

Hello,

Sorry to reignite such an old topic, but I'm curious about how something like this works:

http://www.amazon.com/MicroSD-MicroSDHC-Adapter-Converts-Cards/dp/B001RPEJA4

Maybe I misunderstood the original topic, but isn't this adaptor basically running two micro SD cards in parallel?  So it seems it can be done.  Would it be plausible if one wasn't trying to write the same thing to both cards at the same time.  For instance, you have two 64GB cards, and they are put together to act as one 128GB card.

Or is it the case that an adaptor such as that is running the cards in series?  Is there a difference?  I'm interested in running two 128GB cards as one 256GB card in an iPod.
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 201
Posts: 8669
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

>  isn't this adaptor basically running two micro SD cards in parallel? 

The original question was about wiring two SD cards in parallel to get redundancy/mirroring.  This device appears to adapt between the MemoryStick Pro DUO interface and two MicroSD cards of 8GB or less.

>  I'm interested in running two 128GB cards as one 256GB card in an iPod.

I was not aware of any iPod that accepted memory cards (MemoryStick or SD).  What model did you want to do this to?
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

0
Offline Offline
Edison Member
*
Karma: 63
Posts: 1602
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

No this adapter does not write the SD cards in parallel.  It make two SD cards appear like a twice as large memory stick.

Read the SD spec - it is impossible to access two SD cards in parallel on one SPI bus.  Cards are not synchronous devices.  They go ready at random times and return status at random times.
Logged

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

> I was not aware of any iPod that accepted memory cards (MemoryStick or SD).  What model did you want to do this to?

There are adaptors which will go from an SD card to a ZIF plug.  That's the way to do it.  I found this thread because I was wondering if there was a way to make one of those adaptors use two cards simultaneously.  Kind of like the link I posted, except two full size SD cards (maybe one on top of the other or next to each other.  Depends on space requirements).

With all that said, and I'll open a new topic if it's suggested, but is it possible to make an adaptor like the one I linked to which will serve the purpose I'm looking for?  One which accepts two regular size SDXC cards as one big card.  I apologize for my lack of knowledge of SD cards.
Logged

Miramar Beach, Florida
Offline Offline
Faraday Member
**
Karma: 139
Posts: 5852
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@fat16lib: Can you explain this timing a bit? At what point does the Arduino become SPI slave, and the SD card become SPI master? If the SD card is always a slave, it needs to keep quiet until the SPI master tells it to talk.
Quote
Read the SD spec - it is impossible to access two SD cards in parallel on one SPI bus.  Cards are not synchronous devices.  They go ready at random times and return status at random times.
It is not as much the SD spec that concerns me here. It is the SPI spec. Does the SD card transmit with the Slave Select HIGH? I don't see an interrupt pin. It doesn't interfere with the w5100 on the same SPI bus. If what you imply is true, they should not be able to coexist. ??

Maybe it is just me, but if the SPI is not synchronous, what is the SCK pin for?
Logged

0
Offline Offline
Edison Member
*
Karma: 63
Posts: 1602
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The SD card is always the slave but it controls timing through the protocol between it and the master.  That's why you need to understand the spec.

For example when you send a command to the card it delays by holding MISO high until it is ready to send status.  The master waits till it get something other than 0XFF.

The protocol is filled with stuff like this that allows the card to control the timing for all operations.  That's why you can't enable two card at the same time and run them in parallel.

SD fat supports multiple cards but only by accessing one card at a time.
Logged

Miramar Beach, Florida
Offline Offline
Faraday Member
**
Karma: 139
Posts: 5852
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
SD fat supports multiple cards but only by accessing one card at a time.
So you could possibly access files in both SD cards in one sketch? Just one at a time?
Logged

0
Offline Offline
Edison Member
*
Karma: 63
Posts: 1602
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Correct. You can have files open on both cards and SdFat will handle it.  See the TwoCards example in the SdFat/examples folder.

SdFat is designed to access any number of cards but each card has a 512 byte buffer.  On a Mega or 1284 you could have a lot of cards with files open on all cards.
Logged

Pages: 1 [2]   Go Up
Jump to: