[Resolved] Need to access file names via CMD, CLK, DAT pins on an SD-Card.

This past year, I’ve tried a number of Arduino-compatible sound cards, and been disappointed every time until now. But this month, I purchased the tiny FN-RM01 MP3 Audio Recorder and Player Module, and it’s truly great. Everything from mic signal-conditioning to output-file sound quality is clean and exceptional.

Only one problem, I need it to give me a list of mp3 file names (from the SD-Card plugged into it) so users can choose a file-by-name from my LCD display. But the module doesn’t include a way to retrieve file names.

It DOES have pins on the side labeled SD_CMD, SD_CLK, & SD_DAT, and the company told me I can use those lines with my Arduino processor to retrieve the file names directly from the SD Card itself (rather than through their module), but the person I talked to couldn’t tell me how.

Can someone fill me in on what I need to do to access the names via the CMD/CLK/DAT pins?

I think you'll need to connect to pins 19-24 for 3.3V, Gnd, CS, SCK, MISO, MOSI to access the SD card.

CrossRoads:
I think you'll need to connect to pins 19-24 for 3.3V, Gnd, CS, SCK, MISO, MOSI to access the SD card.

I tried that this morning, but no success so far.

I tried moving the four data lines from my SD-Card holder to the four data pins on the FN-RM01 mp3 module. I connected MOSI to SD_CMD, thinking this must be the input to give commands to the card. That left MISO to be connected to SD_DAT. (CS and SCk connections were obvious.) I passed all four lines through a bilateral voltage shifter using a 3.3v regulator to set the low side.

It didn't work.

So I searched Google to see if my connections could be wrong, and found a page that says:

CMD, carrying commands from the host and responses from the card
DAT, carrying data from the host or data from the card

So my standard SPI connection had no chance of working, since MOSI & MISO each send data in one direction, while CMD & DAT each send data in both directions.

Experimenting a little further, (1) I found neither the Arduino nor the mp3 module could read the card while these data lines were attached. (2) Even with only the separate card reader and mp3 module attached together, the mp3 module could not read the card, whether the card was placed in the separate card reader, or in the module itself. (3) I concluded from 1 & 2 that the mp3 module does not do any switching; instead, all three items (module, SD Card, and the data pins must be hardwired together.

So now I believe I must use an external SD-Card holder, and switch the card holder's connections between Arduino and mp3 module. I even got an NTE40116B quad bilateral switch ready for the purpose; but didn't try it, having discovered the CMD/DAT and MOSI/MISO protocols don't match.

I guess the next question is: What do I need to do to reconcile the differences between Arduino's MOSI/MISO, and the mp3 module's CMD/DAT data connections to the SD Card? (Or must I just give up, and force people to move the SD Card back and forth between two SD Card readers?

Maybe if you can connect the lines via a tri-state buffer this will allow both devices to connect and work.
If the lines are directly connected to the pins on the SD card then can you sniff the traffic using a logic analyzer?

Riva:
... can you sniff the traffic using a logic analyzer?

Wow, Riva. Sounds like you're thinking of a situation on a lab bench with expensive equipment (analyzers) available. But I'm meaning on a small product to be sold at a modest profit.

So I've already accpeted the necessity of having two separate SD Card readers, and am working on the software to make that practical.

Thanks for your ideas. :slight_smile:

CosmickGold:
Wow, Riva. Sounds like you're thinking of a situation on a lab bench with expensive equipment (analyzers) available. But I'm meaning on a small product to be sold at a modest profit.

No so, I have one of these and one of these. Neither will break the bank, surprisingly we don't use Logic Analysers at work.

Riva:
I have one of these

Wow, Riva! I never dreamed there was a tool so small, able to reveal the intricacies of so much data, for only $15. It's amazing how far technology has come in my lifetime.

I placed my order today for that first one you mentioned.

Thank you so much!

@CosmickGold - did you ever manage to do this?

Only I'm using a FN-RM01 mp3 module for a project at the moment and I'm trying to do exactly the same thing as you :slight_smile: