
MMC/SD Card Example Code
This code example show how to intialize and readout sector data from a MMC or SD card. These cards can use SPI to communicate with a host, thereby making it pretty simple to interface with a microprocessor.
The code is written for an AVR microprocessor, but can relatively easy be modified to run on other microprocessors, if you really really want to. The tools used to write the code is the AVR Studio IDE * with the AVR-GCC C compiler. These tools are FREE, and you can find them at AVR Freaks
You obviously also need a MMC or SD card that can be interfaced to your processor. A sugestion is to use the SD Breakout card (shown above) from the JELU Web-shop.
You can also use the Mega8 Mini-Devboard, also from the JELU Web-shop.
The code has been written for and tested on both these platforms.
Extract the files to any subdirectory on your machine.
Assuming you're using AVR Studio, open the sd_breakout_demo.aps project file. Set the Frequency on the Project Option Tab to suit your target system. If you're using the Mega8 Mini-Devboard, set the Device to atmega8.
Simply hit F7, or click the Build Active Project button.
Download the HEX file to your target, using your regular download tool.
Connect a terminal to the UART of your dev-board, set the speed to 115200 bps Insert a MMC or SD card and reset your target. You should now be able to browse the sectors of your MMC/SD card.
/Jesper
Generated on Mon Mar 6 20:15:10 2006 by
1.4.1