This video demonstates the code in action for reading a SD card

you will need the following:
Any MSP430 chip with USI and 4k or more flash
an SD Card
a capcitor (anything more than 10uf)
Code Composer Studio 5 (grace makes things easier)

Step 1: Start up Filesystem

You need to download the code and include the files in the SD folder of the project:

#include "mmc.h"
#include "ThinFAT.h"

then you have to edit the MMC.h file at the beginning where you want your card select port to be:
//card select currently set to P2.7
#define SD_CSn_PxOUT    P2OUT
#define SD_CSn_PxDIR    P2DIR
#define SD_CSn_PIN      BIT7

P1.2 - TA0.1 - Left Channel Out
P1.3 - Input for Playing and Changing Music File
P1.4 - TA0.2 - Right Channel Out
P1.5 - SMCLK out - SD Card Pin 5
P1.6 - SDO - SD Card Pin 2 MOSI
P1.7 - SDA - SD Card Pin 7 MISO
P2.7 - CS - SD Card Pin 1 Card Select
VCC - SD Card Pin 3,6
Ground - SD Card Pin 4

Next you initilise the FAT file system and the SD card for reading:
<p>Could you give us a schematic of this project? Thanks :)</p>
hi! <br> <br>My compiler cannot find the declarions of USISRL and USICNT ... where can i find the file with those variables? <br> <br>Thx <br> <br>F&Atilde;&iexcl;vero
Hi! Thanks for making this instructable. <br> <br>I am wondering if you were able to get a read/write system working? Or perhaps just a write? <br> <br>Thanks in advance!
sorry, I could only handle read only - writing needs to at least store a whole block or you lose everything that was on that block. that makes it difficult to write to the file system without it screwing up all the other files.
Thanks for the information! =)
hey dude... i don't understand why all the wires.. can you tell me what are the funtionality? <br />and the FAT file system.. where i do that?? sorry, but i'm REALLY new in this.... i'm lost. <br />Hey, it's a great project that i want to reproduce... of course, if you let me jeje
basically the FAT16 file system is how regular SD cards, not SDHC are formatted. this allows you to with the right adaptor and power supply to the card to search for files and folders and then read from them. it dosen't support long file names. but you can make any kind of search function you feel like. <br /> <br />on your microcontoller you'll have pins that you can wire to different things and they all have names. this is just the lables for what they go to in this programmed example. you should look up how SPI works, it'll be a good start to understanding how this works. also SD cards have the same voltage tolerances (excluding micro) as the MSP430. <br /> <br />
Thanks for making this an instructable.<br>Helps people like me who are learning about the msp430 in their spare time.<br>Will be trying this very soon. Built my own sdcard holder yesterday after reading this.<br>Thanks again. :)
I'm glad I could help you

About This Instructable


9 favorites

More by siskinedge: Running FAT16 on the Ti Launchpad
Add instructable to: