Reading and Writing to SD Card
A small project made with mbed (mbed.org) on the FRDM-MK64 using the SD card capabilities.
The program will open a file called test.txt in the root of the SD card, and will create one if it does not exist.
It will then write "one two three four five" in the .txt file.
It will then read the text and output the result.You will need a terminal application (I recommend Termite) in order to see the outputs.
The current program overwrites anything that was previous on the SD card.
To prevent this, change the "w" to "a" during the writing process.
This changes the instruction from a 'write' to an 'append'.
This should be compatible with all boards that have an SD card connected.
However the appropriate pins from SDFileSystem will have to be changed to suit the board.
Check your board's schematic for the appropriate pins.
Nice demo program. Are you willing to share the code?
Not sure if you get the source code, but there are other tutorials/projects which might be of interest to you:
Tutorial: Data Logger with the FRDM-K64F Board:
FatFs + SDHC data logger with KSDK in Kinetis Design Studio:
FRDM K64F Data Logger using FatFs with KSDK 1.2.0: