How to interface MMC cards with microcontroller ?

Thread Starter

Embedded Lover

Joined Dec 22, 2008
26
Hello All,
I want to interface MMC cards with my 8051 microcontroller (AT89s52).

It that applicable with this MC version ? if not what the other versions able to do the job ? what specs needed ? how to do it ?

Thanks
 

davebee

Joined Oct 22, 2008
540
Just about any microcontroller could do it, but it's not easy.

You've got the low-level SPI communication routines to write, including voltage translation from a 5 volt controller to the 3.3 volt card. These will get byte-sized data transfer working.

(You'll have an easier time if you use a 3.3 volt controller.)

Then you have the card command/response/error routines to write, which will get 512-byte sector-sized transfers working.

Then you have filesystem code to write, if you plan to use the usual FAT-type filesystem.

Plenty of people have done it, including myself, but it's a lot of work.

Why do you ask about MMC? Most people are going towards the SD card. Or you could write code to access either type of card; the codes are almost exactly the same except for slightly different initialization commands.

If you just want lots of data storage, you can buy modules that will do much of the low-level work for you. If you're looking for the experience and the challenge of doing it then I'd say go for it. Download one of the PDF manuals that describe how to access the cards and read it about a hundred times, and download several of other people's codes and study how they did it, and you'll learn a lot about what's needed.
 
Top