Design of MP3 player based on VS1003 decoder

Publisher:as233632621Latest update time:2011-08-16 Keywords:VS1003  Decoder Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

introduction

Although there are more and more styles of MP3 players on the market, with more and more functions and more personalized and user-friendly appearance, most of the existing MP3 players still integrate the decoder and the memory. This design plays a key role in the portability of MP3 players, but at the same time it also brings some problems: on the one hand, the storage capacity is not easy to expand, and on the other hand, it is not conducive to the application of MP3 players in other fields. This system separates the memory from the decoder, and can use the redundant I/O interface. As long as a small amount of hardware overhead is appropriately increased and the corresponding code is added, the voltage measurement, frequency measurement, temperature measurement and other functions can be easily added on the basis of this system, so that one machine can be used for multiple purposes.

1 System Design

The block diagram of the MP3 player system is shown in Figure 1. The system mainly includes important modules such as the MSP430F149 microcontroller minimum system, audio decoding module, SD card reading and writing module, LCD display module, and Flash memory used to store self-made fonts.


MSP430F149 is a 16-bit microcontroller of the MSP430 series produced by TI in the United States. It has a 16-bit structure suitable for various applications. It adopts the "von Neumann" structure, so its RAM, ROM and all peripheral modules are located in the same address space. It also has ultra-low power consumption performance. Compared with other microcontrollers, the MSP430 series can greatly extend the battery life, which is very important for handheld devices and some electronic products that require low power consumption. In addition, it also has the advantages of flexible and powerful processing capabilities, rich memory, and peripherals.

2 Specific implementation of hardware modules

2.1 MSP430F149 MCU Minimum System

The MSP430F149 minimum system is the core part of the overall design, controlling the coordinated operation between the various sub-modules of the system. The success of its design is directly related to whether the entire design can operate normally. As shown in Figure 2, the MSP430F149 minimum system mainly consists of four parts: voltage regulator module, crystal oscillator circuit, reset circuit and human-computer interactive key input. SPX1117M3-3.3 is a system voltage regulator chip that provides a stable 3.3 V power supply for the system. SP708S is a system management chip that, together with the manual reset switch, mainly plays a reliable reset role. Considering the human-computer interaction operation of the MP3 player, a total of 6 keys (KEY1 to KEY6) are designed. Their key functions are: confirm, down, up, exit, volume up, and volume down.

[page]

2.2 Audio Decoding Module

VS1003 is a single-chip MP3/WMA audio decoding chip produced by VLSI of Finland. It has a high-performance, low-power DSP processor core VSDSP, 5 KB instruction RAM, 0.5 KB data RAM, serial control and data input interface, 4 general I/O ports, 1 UART port, 1 variable sampling rate ADC, 1 stereo DAC and audio headphone amplifier. Its internal structure is shown in Figure 3.


The audio decoding module parses the digital MP3 audio data stream read by the microcontroller from the SD card and converts it into an analog signal for output. Figure 4 is a circuit diagram of the audio decoding module of the MP3 player.


The VS1003 audio decoding chip is used to implement the parsing of music data streams. The data communication between VS1003 and the core controller MSP430F149 is carried out through the SPI bus. VS1003 receives the control commands of MSP430F149 and the data of MP3 through the serial command interface (SCI) and the serial data interface (SDI); and confirms which interface is in the transmission state by setting the xCS and xDCS pins high/low. The function control of VS1003, such as initialization, soft reset, pause, volume control, reading of play time, etc., is all realized by writing specific registers through the SCI port. Between two SCI instructions, the DREQ pin signal is used to determine whether the previous processing is completed.

2.3 SD card module

SD cards are low in price, have large storage capacity, are easy to use, and have strong versatility and security. MP3, digital cameras and other devices all use SD cards as their storage devices.

SD card supports two bus modes: SD mode and SPI mode. Among them, SD mode uses 6-wire system, while SPI mode uses 4-wire system. When using a microcontroller to read and write SD cards, SPI mode is generally used. Different initialization methods can be used to make the SD card work in SD or SPI mode.

[page]

In this design, the audio data MP3 file is stored in an SD card, so the circuit design must include an SD card reading module. Figure 5 shows the interface circuit of the SD card module (SPI mode).


2.4 LCD Module

The LCD3310 is a 48-row 84-column LCD display. It has a low-power PCD8544 CMOS LCD control driver, and the serial input speed can reach up to 4.0 Mb/s. In order to enable the LCD3310 to display 4 rows of 12×12 Chinese characters, the system has opened up a 6×84-byte buffer. When writing to the LCD, you don't need to write directly to the static DDRAM of the LCD3310. You can first write to the data buffer opened by the system for it, and then refresh the modified part to display the content to be displayed. The interface of the LCD3310 adopts the SPI mode, and its circuit is shown in Figure 6.

3 Software Design

Figure 7 is the software flow of the MP3 player. After the system starts, the hardware module is initialized first. The microcontroller reads some basic information of the SD card through the FAT32 file system interface, such as capacity, sector size, FAT table, and the starting sector of the root directory. This information can be used to find out whether the SD card has music files that can be played. If so, the microcontroller reads the audio information through the SPI bus and sends the song's code stream information to the VS1003 chip. The VS1003 decoding chip and its built-in high-quality stereo DAC and headphone driver circuit realize the MP3 song playback function. Under the control of the buttons, the song selection and volume control functions are realized by selecting the menu options in the LCD3310; while playing, the information displayed on the LCD3310 includes the song name, progress, volume, etc.


After running the test, the system can play 320 kb/s high-quality MP3 music files normally and smoothly, and can play normally for up to 10 hours when using a 500 mA lithium battery. It can be seen that its power consumption is relatively low.

Conclusion

Based on the principle of low cost and strong practicality, an MP3 player with a separate decoder and memory is designed, which can smoothly play high-quality MP3 files. At the same time, as long as a small amount of hardware overhead is appropriately increased and the corresponding code is added, the redundant I/O ports can be used to conveniently add functions such as voltage measurement, frequency measurement, and temperature measurement on the basis of this system, truly achieving multiple uses of one machine.

Keywords:VS1003  Decoder Reference address:Design of MP3 player based on VS1003 decoder

Previous article:Design of hybrid pulse width and volume adjustment alarm based on MK7A23P
Next article:Application of automotive FPGA in racing car engine control unit

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号