Building A Media Player With An MSP430

A media player based on an Arduino and SD card has been done to death several times over, but that doesn’t mean we can’t appreciate [Matt]’s MSP430 audio player. It’s a very nice piece of work that supports a FAT16 file system and only takes up 54 bytes of RAM.

To make his dream of a 430 media player a reality, [Matt] based his work on the DIY Life Talking MSP430 project. Unlike this previous attempt to play music with a ‘430 and SD card, [Matt] threw in a full FAT16 file system, allowing him to drag and drop audio files on his computer to the SD card.

Right now [Matt]’s build can play a stereo audio file through its speakers, but the sound quality over a mono file is greatly reduced. The maximum sample rate is 16kHz; a ‘good enough’ sample rate if you’re listening with terrible headphones. In the video after the break, [Matt] plays this awesome Symphony of Science on his homebrew media player. We’re guessing his camera doesn’t do his project justice, but it’s still impressive nonetheless.


13 thoughts on “Building A Media Player With An MSP430

  1. From “ThinFAT.h”

    // Title : Thin FAT File System
    // Author : Matthew Rogan
    // Created : 22/03/2012
    // This code is distributed under the GNU Public License
    // which can be found at

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

    // total ram use 54 bytes

    // Current Loaded File System 14 bytes
    struct sThinFAT16FS {
    unsigned long BootSector; // First sector of FAT16 Partition
    unsigned char FatSector; // Sector of first FAT
    unsigned int RootSector; // Sector of Root Directory
    unsigned int FirstCluster; // Sector of First Cluster
    unsigned char ClusterSize; // Sectors in Each cluster
    unsigned char ClusterShift; // power of 2 of the cluster size
    unsigned int RootEntrys; // Count of entry's in Root Directory
    unsigned char SDStatus; // SD card status
    } ThinFAT16FS;

    // Current Streaming File 27 bytes
    struct sThinFAT16File {
    unsigned char Filename[8]; // Name of file
    unsigned char Extension[3]; // File Extension
    unsigned char Attributes; // File Attributes
    unsigned char mode; // status of Filesystem
    unsigned int CurrentByte; // current byte
    unsigned int FirstSector; // First Sector
    unsigned long CurrentSector; // current Sector
    unsigned long LastSector; // last Sector
    ThinFATFileEnd EndOfFile; // Callback when file ends
    } ThinFAT16File;

    // Current Directory 6 bytes
    struct sThinFAT16Folder {
    unsigned int StartCluster; // Starting cluster of directory
    unsigned long FolderSize; // Last byte in directory
    } ThinFAT16Folder;

    // Temp files of ThinFAT16 7 bytes
    struct sThinFAT16Temp {
    unsigned char A;
    unsigned int B;
    unsigned long C;
    } ThinFAT16Temp;

    Hell yeah! Nice work.

  2. I’m going to give a shot at getting writing support working I’ve also got a Instructable up so people can get this implemented on their own MSP430 chips easily since this morning:

    it should be able to get 32kHz sampling in mono if I ran it at 16MHz instead of 8MHz, but that would use a 3.3v minimum instead of 2.2v.

    the problem with writing is that it requires a lot of different code, so to fit on a 4K flash it might be necessary to choose beetween reading or writing.

    thanks again for putting my project on your site, I’ve been reading it every day for 2 years. next time I should have better pictures if I can borrow my little sisters DSLR.

    1. beacuse some people with microcontrollers want to know the hardware and develop something they can deploy to a end product instead of sitting in a dev board and booster blahs.

      I developed this for a reason, I have a younger brother that loves music. he’s got a learning disability and he has trouble with music players so people need to set them up for him but he cant even choose his music on them. then one day macdonalds do a bunch of one button music players that do 10 seconds of music and he was able to use them.

      thing is he used them near every minute of every day and they all ran outta juice. so I started working on this with this specific micro to meet several important design considerations for him:
      low power for constant use – MSP430
      sealed, no batterys – use solar panel
      waterproof – use capcitive touch, no buttons
      play music – use an SD card

      I’m still waiting for the panel and the orthodynamic driver for outputting sound. I’ve also been looking around for a nice see through box that fits nice in a hand 24 hours a day. enginnering is all about meeting design considerations. that is why.

  3. Not sure if this is your issue, but make sure Step 2 is performed with the Power’ button (top of device), not the Home’ button. I made this mistake first time and couldn’t figure out why Voice Control kept launching…

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.