Specifications

To test the connections of the bus and the functionality of the decoder board, the
decoder was sent the test sine wave. To do this the decoder had to first be initialized by
calling the initialisation function, setting up the required pins as outputs or inputs and
then enables the SPI function of the Atmel mega103. The decoder is then reset by
calling the software reset function, which writes hex 4 to the control register telling the
chip to reset then the clock speed of the crystal attached to the decoder is written to the
register. If this is not done, the MP3 data will still play but at the wrong speeds. In this
case, hex 9800 is written to the register to indicate that a 12.288Mhz crystal is attached
and that the clock doubler should be enabled so that the internal clock is at 24.576Mhz.
In initial tests, this part was left out and the MP3’s would play at half speed. Next, the
reset function clears the buffer on the decoder by writing 1024 0’s to the data register.
To create the test sine wave the test code loads a set data set into the decoder that
produces the sine wave. With this function, the frequency and length of the tone can be
modified by passing it different values. Tests with this function showed that the MP3
decoder was operating and connected properly. It also showed that the sound was clear
and at a good level.
34