Interfacing microSD with LPC1769 Board

librarylpcxpressomicrosdspi

So we're trying to store bytes (from an A/D converter) of data into a SanDisk 1Gb microSD card from a LPC1769 microcontroller board using the on-board SPI protocol. I know how all that stuff works, but I have no idea how to start working with the microSD card – I've seen various references to CMD0 and what not, but I don't know where to find this library or how to properly incorporate it into the C compiler for the board.

All I need is to figure out how to start the connection properly and then how to read and write data into the card at designated blocks.

void write(int data, int block)
int read(int block)

Is there a library to do that? If not, how can I implement this?

Best Answer

From nxp.com: AN10916 - "FAT library EFSL and FatFs port on NXP LPC1700" should give you some pointers.

There is also AN11070 - "Accessing SDC/MMC card using SPI/SSP on LPC1700".

The specifications for SD(-HC, -XC) can be downloaded from sdcard.org.

how to properly incorporate it into the C compiler for the board

We don't know which compiler or board you use.