1
\$\begingroup\$

I want to connect an ATMEGA328P to a mobile phone, a Samsung Galaxy S3 to interface some data.

I need to use the microSD port behind the battery cover for this purpose, so here is the question, Is it possible to use SPI to emulate an SDIO card, or even an MMC card if I hook up the ATMEGA328P via SPI to the microSD slot on the back of the Samsung Galaxy S3? If so, how can I wire it up and which modes are suitable? What is the difference between MMC, SD, SDIO. Can all of them be used without some kind of license? What voltage can I expect? Will the ATMEGA328P be runnable on both 1.8v and 3.3v?

EDIT: This question is really about MMC/SDIO and not looking for different solution. There are companies manufacturing MicroSDIO cards with NFC functionality and ZigBee functionalities and I have read multiple users who had no problem getting these to work on Android, so my guess is that they either emulate a memory card and read/write to files or if there is actually a possibility to develop user land drivers, or they have rooted their device and made changes in the system. But since there are companies advertising these products i am doubtful they require root access. From what I read SDIO should be supported in the kernel since Android 2.2 but the online information on this I have found is very limited. If SDIO is supported I would still expect there to be support for user land drivers. If it is the case that SDIO mode on Android need drivers in the system image I would appreciate a reference on this and how to accomplish it.

I would have no problem making this work using Android open accessory protocol, USB OTG, Bluetooth LE (Smart) or WiFi, with all these I can write user land "drivers". I have no experience in SDIO and that is why I am asking the question here I realize that my original question was not clear enough on this point.

I am interested if someone have real experience in this and suggestions of other solutions will unfortunately not help me at this point. Thanks for your understanding

\$\endgroup\$
  • 2
    \$\begingroup\$ This is probably not workable, unless you can change the system software on the phone to talk in basic SPI mode, and to talk I/O type operations rather than expect to interact with a FAT filesystem. \$\endgroup\$ – Chris Stratton Nov 11 '14 at 21:13
  • \$\begingroup\$ Use a phone comms interface that's designed for the purpose; Bluetooth is the obvious one. \$\endgroup\$ – markt Nov 11 '14 at 21:18
  • \$\begingroup\$ @ChrisStratton Are you really sure? I have read all over that SPI mode is the most basic mode of SDIO and always available? \$\endgroup\$ – www.jensolsson.se Nov 11 '14 at 22:34
  • \$\begingroup\$ @markt Sorry using Bluetooth is not an option. I am in particular interested in getting the micro SD port to work. \$\endgroup\$ – www.jensolsson.se Nov 11 '14 at 22:37
  • \$\begingroup\$ In my opinion you're wasting your time, not least because you've asked a number of secondary questions that prove pretty conclusively that you don't have any of the background knowledge required to have even a vague chance of making this work. \$\endgroup\$ – markt Nov 11 '14 at 22:43
1
\$\begingroup\$

As you point out, there are SDIO cards available with various useful functionality. This should tell you that it is possible to produce an SDIO slave device. If you can find an SDIO slave interface IC, or a microcontroller with an SDIO interface that can be configured as a slave, or if you can write an HDL well enough to build an SDIO slave interface in an FPGA, then you have a shot at doing this.

More broadly, I suggest that you explain what it is you're actually trying to do. Doing so may elicit an approach that is practical and that you haven't thought of.

\$\endgroup\$
  • \$\begingroup\$ Thanks for the reply, Sounds like using SPI is not possible so I need to use true SDIO. Program my own FPGA sounds like you say very time consuming and hard. Maybe there are an out of the box controller that I can use and connect to a microprocessor, or even load software to the controller itself. \$\endgroup\$ – www.jensolsson.se Nov 12 '14 at 12:45
0
\$\begingroup\$

It is possible to bitbang (maybe a subset) of an sdio slave (sd card) device. But without hardware support it will be ineffecient and slow. It is real work to reach 400khz with at ATMEGA328P.

\$\endgroup\$
  • \$\begingroup\$ I was kind of hoping there was some mode I could use that would be slow and easy. Since SD memory cards have a legacy SPI mode. \$\endgroup\$ – www.jensolsson.se Jan 21 '16 at 8:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.