MP3 Playa
Not long after arriving at Cambridge, the Memory Stick connection in my PDA broke.. So, i'm now without an MP3 player.. Sad... After shopping around for an MP3 player, I've decided that none actually fit my bill... That's when the thought of building my own MP3 player came into being.. Then, after doing some research, I've decided that it is definitely plausible.. Many others have done it and I think that having my own MP3 player is just plain cool.. Even if it's all bare bones without an iPod finish, it'll still trump the iPod (in my heart), because I built it myself.. Hehe..
So, this is the basic plan.. I will build the MP3 player using the following devices:
- PIC18F2410 (16kb Flash, 768b RAM, 28pin DIP/SOIC)
- STA013 (10MHz, 28pin SOIC)
- CS4334 (8pin SOIC)
I plan to use the MMC/SD card as the main storage medium.. They're quite cheap now.. current prices are sub RM300 for 1Gb of storage.. And it's small.. the RS-MMC makes it even smaller.. And now that SD has announced building in USB mass storage into the cards so that they can connect directly to USB, it just makes sense.. Also, I will be using a graphical LCD from the Nokia 3310 phones as the display device.. This gives me 84x48 pixels or 14x6 lines of characters with a 7x5 font size.. which is plenty of space.. Oh yeah, little pushbuttons for user input..
All of them, the MMC/SD + LCD + STA013, make use of SPI communications.. Since the PIC18 has a built in MSSP in SPI master mode, I will put all these devices on a main SPI bus with seperate control lines for each of them (not actually necessary)..
- MMC/SD (2-way SPI communication, most active device)
- STA013 (1-way, can be connected directly to MMC to bypass PIC)
- LCD (1-way)
- Downloading Config File
- Setting/Reading Volume
- Setting/Reading Treble/Bass Boost
- Setting/Reading Cross-Over
- Reading MP3 header information
By running with INTOSC, the PIC18 can run either at 8MHz or 32MHz.. This gives us a safety margin in case our software is inefficient.. at 8MHz, SPI will run at 2Mbps.. well within the SPI speed and well above the required 320kbps that is the maximum for typical MP3s.. If necessary, we can connect the STA013 directly to the MMC and have the MMC feed in the data by-passing our PIC18, effectively doubling our communication bandwidth.. But I think that all these would not be necessary as the 2Mbps speed is fast enough to handle everything..
As for the software, it will be 100% interrupt driven.. The PIC will respond to the following interrupts:
- STA013 Data Request (INT2)
- LCD Update Timer
- Pushbutton Events (KBIO)
Well.. That's all for the hardware.. We will dwell into the software at another time.. Still haven't actually sat down to think about the software.. Just that a graphical LCD allows us to do wonders with the UI.. And 4 pushbuttons.. Reminds me of a Siemens phone UI...