Imaging an SD card
The MSP430 isn't powerful enough to deal with a file system, so we need the audio to start exactly at the first sector the of SD card. A simple copy->paste operation would put the file on the SD card according to the rules of the PC file system. To avoid this, we image
the file directly onto the card. This will be familiar if you've ever 'imaged' a CD .iso file, say, for a bootable Linux live CD
. I used DiskImage 0.9 from Durban
Imaging the audio file onto a flash card was pretty easy with DiskImage. I put the SD card in a USB flash card reader and attached it to the USB port. I opened DiskImage and it detected the card as a logical and physical volume.
- It's crucial to deal with the disk directly, rather than through the file system. All operations should be done to the listings under "Physical drives - raw drive, independent of partitions" box.
- Find the physical partition that represents your SD card - it's easy to identify the correct physical drive because it should be type "Removable" and the correct size (in my case 14MB). Be sure you don't overwrite your actual hard drive, this utility can easily do that!!!
- Click on the correct drive to highlight it.
- In the "With selected item do" box, click the "Import from file" button. Click yes, and type "i agree" after you verify that the correct disk is selected. Click yes again.
- Next, DiskImage prompts for the file that will be imaged onto the disk. Choose the raw audio .txt file outputted earlier.
With the raw audio imaged onto the SD card, we're ready to play it from the MSP430. Take the SD card out of the computer and put it into the card holder on the prototype.