Design By Zhi-Hern Loh

Home
Design
Results
A 2nd try
Schematics
Code
Files
Links
Contact

Flowcharts Program Design Hardware Design Time lines

Overall system description

Reading flowcharts would be helpful in understanding the operation of the MP3 Player. The flowcharts describing the MP3 Player's operation can be found here.

Rationale

There were several design considerations for the project, data sources, decoding chips, ATMEL MCUs and the user interface. The design decisions that I made are explained in the following sections.

Data sources

Transfer rates are the determining factor for the possible data sources. For a PC serial port, the maximum possible RS-232 transfer rate is 115.2kbps (14.4KBps). At this speed we can at most send a 48kbps stereo MP3 file (average size 2500KB). The minimum speed required can be calculated by dividing the file size by the length of the song. For a MP3 of 2500KB and duration 3mins, minimum transfer speed would be 13.8KBps.

For a serial MP3 player, transfer rates are limited by the speed of the serial port and not the MCU - decoder interface because for the MCU - decoder interface, a MP3 data byte can be sent in roughly 40 cycles at 16 Mhz (taking 2.5E-6 s/byte). Translating to a theoretical maximum transfer rate of  400KB/s. When we take into consideration the 70 cycles of overhead when calling a C procedure, the transfer rate drops to about 150KB/s. Therefore the limiting factor for the MP3 player is the serial interface.

Initially the data source was not the serial port but a CD-ROM drive. The drive that I used was 24X (24*150kBps) which was more than sufficient for MP3 playback. Unfortunately the drive could not be used in the final version because the bugs could not be sorted out in time. This cost me about 2 weeks worth of wasted work soldering and programming the notebook CD-ROM drive.

Decoding chips

There were a few decoder chips that I considered and they are described below:

bulletVirtual IP Group M3006 V-MP3 : This chip had both an encoder and decoder as well as a USB interface for upload and download. However the chip had not been manufactured yet at the time this project started.
bulletMicronas (MAS 3587F) Encoder/Decoder: This chip had both an encoder and decoder. The control interface was via I2C and MPEG bitstreams were to be sent by 6 input lines. This was more complicated than the STA013 decoder.
bulletSingapore Technologies (STA013): This chip only had a decoder but that was enough for my project. Also, the interface for this chip was simple, the control interface was via I2C and the MPEG bitstream was sent using 3 lines, SDI, SCK and DATA_REQ. There were also quite a few examples that I could refer to during the course of my project (PJRC.com and the previous MP3 project on the ECE476 website).

ATMEL MCUs

There were 2 MCUs considered for this project:

bulletATmega103 - This chip was used by the previous group doing the MP3 project. It has more I/O ports than the 8515s and Mega163s. Making it more suitable for handling both a CD-ROM drive and the decoder.
bulletATmega128 - This chip had all the functionality of the Mega103. In addition, it had a I2C interface built in which proved to be very useful and reliable for the decoder control interface. Also, PORTF on the mega103 was input only whereas the mega128 had a bi-directional PORTF. These advantages persuaded me to use the mega128 instead.

User Interface

bullet16x2 LCD display
bullet4 Push Buttons - For start, stop and volume control. (Initially this also included track selection, but the failure of the CD-ROM drive removed the need to select tracks.)

 



Home | Design | Results | A 2nd try | Schematics | Code | Files | Links | Contact

For problems or questions regarding this web contact Zhi-Hern Loh.
Last updated: 05/02/02.