A couple of readers have warned me recently that SDHC and SDXC cards are becoming the norm and that spells troubles for the unaware.
In fact, both in the PIC24 (both editions) and the PIC32 book, I spent a couple of chapters to discuss the interface to SD/MMC Cards and developing a small library to allow access to files when the cards are formatted using a FAT16 file system.
While the key principles remain the same, things change quite a bit when you start consider (7 years later) what the market offers. Basically, SD/MMC cards are slowly disappearing as the memory size upper limit (2GB) of the original standard has been reached and quickly passed. To overcome that limitation, since 2009, several vendors have started adopting the SDHC specifications first (increasing that limit to 32GB) and the SDXC specification later (increasing the limit to 2TB).
At the same time the file system has changed as most users nowadays prefer FAT32 formatting and eventually the SDXC cards have been standardizing on the “exFAT” (patented) file system.
The SDMMC.c and FileIO.c examples do NOT support any such features!
Clearly it goes beyond the scope of the books I wrote, and it would require a much more complex body of code to keep up with these advances. Although I might soon add support for the FAT32 file system (or I might simply replace it in the examples), I think the most appropriate thing to do is to direct my readers to the Microchip MDD File System library. This is a standard component of the larger Microchip Application Library and is a free, current, professionally maintained and documented piece of software that I greatly recommend for all actual embedded control applications!