SPI for SD Card Interfacing

Control of multimedia and SD cards without a native host interface is possible by using the card's SPI mode. The communication protocol is relatively simple, as described in detail here (http://elm-chan.org/docs/mmc/mmc_e.html) by ELM-Chan. It is possible to use an AVR SPI peripheral for this with ease. The necessary configuration for SD card initialization is as follows:

After initialization, the SPI clock prescaler and 2X setting can be changed to result in a faster SPI clock.