Archive for September, 2008

Using the vs1002 MP3 IC with an AVR

A MP3 decoding ICIn one of my various orders to Sparkfun, I picked up a vs1002 IC on a breakout board. Just yesterday I got round to having a good look at it, and I figured if I show my code then others will not have to do the boilerplate and just get it working. My setup is a ATMEGA88 running at 3.686MHz on a STK500 board, but it should work for most anyone with a decent clock speed. Just remember that all code is ATMEGA88 specific and may need to be changed for other devices.

Things that may be useful: the Sparkfun page, the datasheet.

Communication modes

(Note: The vs1002 has a backwards compatability mode with the vs1001. We will not be using it)

The vs1002 IC does all meaningful communication over the SPI port. It has two submodes if you will, one being SCI (Serial Command Interface) and the other being SDI (Serial Data Interface). SCI is for things like play control, reading and writing registers and small technical changes. Conversely, SDI is there for MP3 data and a few testing modes.

Since the AVR has only one SPI bus, we will be sharing the CS (Chip Select) line with both submodes.
Continue reading ‘Using the vs1002 MP3 IC with an AVR’