This article refers to the address: http://
Abstract: The multimedia application processor referred to as MAP is a new embedded application processor for portable digital audio and video equipment. The main performance characteristics of MAP are introduced in this paper. The hardware design, MP3 decoding process, real-time operating system design and system software and hardware debugging process of embedded MP3 player based on MAP chip ATJ2135 are given.
Keywords : multimedia application processor embedded MP3 full software mode
Files compressed by the MPEG standard Layer 3 algorithm are collectively referred to as MP3 files, and systems capable of decoding MP3 files and restoring sounds may be referred to as MP3 players. As a representative of consumer electronics, MP3's growing consumer demand has also prompted manufacturers to adopt more advanced technologies to enhance the competitiveness of their products. For digital audio and video applications on MP3, MP4 and smart phones, SOC chip manufacturers such as SIGMATEL in foreign countries and Zhuhai Actions IC Co., Ltd. have launched MAP-based solutions.
MAP, or Multimedia application processors, is the abbreviation of multimedia application processor. It is a very large-scale SOC integrated circuit that extends audio and video functions and dedicated interfaces based on low-power CPUs. It is a new embedded application processor. The main application area of ​​MAP is portable consumer electronics. MAP requires low power consumption, small size, and the highest possible performance. Therefore, many of the latest technologies in the field of microelectronics and IT are used in MAP. For example, the 90- and 45-nanometer processes increase speed and integration, and use dual-core and multi-core CPUs and DSPs working in front and back to improve performance.
MAP is divided into full software mode and full hardware mode. The full software mode uses an embedded central processor plus a digital signal processor, namely CPU+DSP. The embedded CPU in the MAP acts as a general-purpose hardware platform running a common operating system. The embedded DSP in MAP is another core device whose task is to perform complex high-speed information processing. The full hardware mode uses the CPU + ASIC, and the audio and video decoding function is completed by the dedicated integrated circuit.
The design and implementation scheme of an embedded system for an intelligent toy MP3 player based on the full software mode dedicated SOC multimedia application processor chip ATJ2135 of Zhuhai Actions Co., Ltd. is given below.
The core of the player is Actions' ATJ2135 chip. The main components include power supply unit, display unit, keyboard input circuit, FM radio unit, external memory, amplifier and speaker unit. The overall block diagram of the system is shown in Figure 1. The embedded DSP in the master MAP performs audio decoding on the MP3 file, and the decoded sequence is output to the power amplifier and the speaker or the earphone through the DAC in the MAP.
Figure 1 The overall structure of the embedded MP3 system
The embedded CPU in the main control MAP runs real-time operating system management including keyboard and LCD, file system, FM module, and realizes MP3 data management, entertainment games, communication and other functions.
The ATJ2135 is a truly ideal "one-piece solution" SOC digital multimedia processing chip, providing users with a very flexible and affordable embedded audio solution. A 32-bit RISC MIPS core is used and a 24-bit embedded DSP is integrated to form a dual-core architecture. The DSP is used for the audio decoding algorithm, and the CPU is used for the operating system of the player. The ATJ2135 also integrates a clock, internal memory BROM, and SDRAM, keyboard and YUV2RGB display interface, peripheral control components such as ADC, DAC, power management PMU, infrared interface.
A suitable low power supply is one of the key designs in portable systems. This hardware system is usually powered by a lithium-ion rechargeable battery. When the system exchanges data with an external PC, the system power supply will adopt the USB power supply mode, and the lithium battery will stop supplying power. Therefore, the circuit should have the functions of power switching, voltage regulation, charge and discharge. Since the components operate in the buck mode, XC62 series regulator chips XC6206P152M, XC6219B182MR and RCR3402 are selected.
2.3 input and output components
2.3.1 A / D type line control keyboard interface design
In order to adapt to the particularity of MP3 applications, ATJ2135 provides another keyboard structure that we rarely see in other embedded applications - A / D type of line control keyboard. This kind of keyboard can further reduce the number of I/O ports used. The series resistor network outputs different voltage values ​​when different buttons are pressed, and then performs A/D conversion to find the corresponding digital quantity, thereby setting according to software. Determine which button is pressed. In order to reduce the error and improve the software recognition rate, the voltage divider resistor should use a high-precision resistor with an error range of 1%. The software can set a suitable wide range to distinguish each button value. The ATJ2135 provides a 4-bit low resolution A/D converter that can be easily configured into a line control button mode.
Since the ATJ2135 chip does not have its own LCD Controller, an LCD (LCD) with LCD Controller is required. This system selects KGM281E0 as the liquid crystal display. KGM281E0 is a 240xRGBx320 dot matrix TFT-LCD display module, which can be configured as 16-bit or 18-bit parallel data input mode to support video playback, and the display effect is very good. The backlight driver of the display requires a higher voltage and requires adjustment of the brightness of the backlight as needed. Therefore, an efficient boost circuit is needed to achieve this function. For this reason, the ATJ2135 provides a backlight control, which can be set according to the software. The output is output with 8 pulses of different frequencies, and the brightness of the backlight is changed by changing the output frequency value.
The player uses a 512 M NAND FLASH as an on-chip memory unit with fast write speed, good shock resistance, small size and weight, especially suitable for portable systems. In addition, the system also integrates an SD card slot to facilitate users to upgrade storage space. The Flash chip uses Hynix's HY27UT084G NAND Flash Memory, which operates at 1.8 or 3.3 volts. In order to improve the system running speed and adapt to the data processing during video playback and games, an external SDRAM memory chip is also expanded. The memory interface mode adopts a three-bus connection mode.
3.1 MP3 decoding process
Figure 2 MP3 decoding flow chart
MP3 uses a more complex bitstream structure, and all MPEG bitstreams are split into separate frames. For MPEG Figure 2 audio, a fixed number of frames are transmitted per second, that is, when the bit rate and sample rate are fixed, each frame has the same size and carries the same number of samples. The decoding algorithm is implemented by embedded DSP software, and the process is shown in Figure 2.
3.2 embedded real-time operating system design
The ATJ2135 uses the μCOS-II operating system for software migration design. μCOS-II is an embedded real-time operating system with open source code. It has small kernel, multi-tasking, rich system services, easy to use and so on. It is very stable and reliable. Due to its extremely small core, it is especially suitable for embedded MP3 application system development that is extremely sensitive to program code storage space requirements. The system uses a deprivable multi-tasking kernel, and its task layer design and task flow are shown in Figure 3.
3.3 Embedded system software compilation and debugging
The embedded development tool of ATJ2135 used by the system is cygwin. The cygwin software was developed by cygnus solution and is a Unix emulation environment running on the Windows platform. Among them, USDK13O provides the most important means of debugging. It needs to add a print statement in the debugged code snippet, and the run is to observe the printout on the HyperTerminal to diagnose whether the program conforms to the design logic. Debugging a program with printouts is a simple and practical way to debug. It can be informed of its operation without interrupting the system. HyperTerminal provides the log function. Just click the capture text item under the transfer menu, and then set the directory where the log is located. All the information output will be recorded in the log file for subsequent analysis and searching. When there is a defect in design or coding, the system will crash and output abnormal information at the terminal. At this point, you can compare the address of the abnormality with the space allocation table provided by USDK130 to find the abnormality.
Figure 3 task layer structure and task flow chart
After the software is compiled and debugged, some *.app applications and *.drv driver files will be generated. These files should be packaged to generate firmware files with the suffix fwu, and downloaded to the embedded Mp3 bare metal by means of mass production tools.
4 system debugging
Since the embedded MP3 has high signal requirements, it is necessary to fully consider the interference of external signals during wiring, so the PCB is a four-layer board. The layout of the PCB is divided according to the functional module partition, and the analog signal is reasonably separated from the digital circuit and the noise source part (such as DC-DC) so that the signal coupling between them is minimized, and the mutual crossover is minimized. The power supply should be routed from a small current to a large current and finally to the negative (ground) and positive terminals of the power supply. The power supply should pay attention to the wire diameter. The signal line should keep the same line width from the starting point to the end point. Do not change the thickness.
When the current of the whole machine is normal, the voltage of the key point is measured, and the prototype can be connected to the computer after everything is normal. If the circuit is normal, the PC operating system should prompt to discover the new hardware device. At this time, the production tool opens the firmware file to download the firmware to the system, and then tests each function one by one to correct the found problems.
5 Conclusion
This paper presents an embedded application based on multimedia application processor SOC chip ATJ2135 to realize MP3 player. The MP3 is used in a smart toy that exhibits powerful features and superior performance. The ATJ2135's full software working mode allows the MP3 player to quickly transform itself into an MP4 by adjusting the audio decoding algorithm performed by the embedded DSP to an AV decoding algorithm without changing the hardware structure. The same changes are made to the real-time operating system. This provides a guarantee for the rapid upgrade of portable digital audio and video equipment belonging to consumer electronics to adapt to changes in market demand. This product has been put into production in 2007 and has an economic benefit of about 1 million yuan.
The author of this article is innovative:
Through the MAP application design practice of embedded MP3 player, it can be shown that the better structure of embedded MP3 design is CPU+DSP, that is, installing real-time operating system running application and processing user data on MAP embedded CPU, using embedded DSP The software algorithm can deal with various formats of video and audio signals, and can obtain powerful performance and can easily upgrade the product.
references:
[1]. Jiang Xiuhua. Principles and Applications of Digital Television. Beijing: People's Posts and Telecommunications Press, 2003
[2]. Shen Shengqing. Kernel Research of Embedded Operating System [J]. Microcomputer Information, 2006, 2: 72-74.
[3]. Ren Zhe. Principle and application of embedded real-time operating system μC/OS _II. Beijing: Beijing University of Aeronautics and Astronautics Press, 2005.
Fabric Bluetooth Speakers,Fashion Fabric Bluetooth Speaker,Portable Bluetooth Speaker,Tws Bluetooth Speaker
Comcn Electronics Limited , https://www.comcnspeaker.com