PIC16F877A and sd card reader/write

ErnieM

Joined Apr 24, 2011
8,377
The circuit should not be an issue: just connect the SPI lines to the CD card, add the chip select, and if you care also add inputs for card detect and write protect (which will probably need pullups).

Google will provide many schematics to do this simple task. Note the hard part only occurs when your PIC doesn't run at 3.3V as the SD card must do.

However, the software is the issue. Using Microchip's FSIO file system library and the free C18 compiler the code is going to take some 30K+ and you need 1K or RAM for the buffers.

If you want an alternative software library there is the FatFS and Petit FatFs out there, but I have not used these. They may lead to smaller code.

I would strongly recommend using a very large PIC to begin. I abandoned not one but two rather involved breadboards as I learned this lesson. I'm currently working with the PIC18F47J53 device and have a warm fuzzy feeling I've only used 40 out of 65K of the memory so far while still writing support tasks and not one line of direct application code so far.
 
Top