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.
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.
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
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- EEWORLD University - How to use independent measurement ADC to design high-precision CT phase meter
- A collection of selected PCB design resources, free points download for a limited time
- MCU model confirmation and decryption
- [Zero-knowledge ESP8266 tutorial] Quick start 25 Blynk control RGB LED
- Need a 10uh inductor, ESR < 0.2Ω, saturation current > 0.8A
- Ti DSP optimization basic strategy
- Bluetooth Protocol Stack-01
- Thanks to shihuntaotie netizen for donating a large number of development boards!
- Scattered Noise Figure
- [Mil MYC-JX8MPQ Review] Running TDengine