Design of hard disk MP3 based on MTM809

This article refers to the address: http://

Abstract: This paper first introduces the system framework and various functions of the MTM809 embedded processor, and then introduces the design principle of the MTM809 based mobile hard disk MP3 player.
Keywords : embedded; microprocessor; MTM809

Introduction to an MTM809 processor system
--- MTM809 is an embedded processor with 8051 CPU as the core. As an MCU specially designed for portable systems, it uses a 0.25μm CMOS process with a core operating voltage of 2.5V and an IO input and output voltage of 3.3V. It is rich in resources, embedded with USB2.0 controller, a FLASH card reader controller, ATA/ATAPI hard disk controller and an MP3 decoder and other peripherals. The transfer of data between the various peripherals makes the transfer of data highly efficient by not requiring the intervention of the CPU. The main features of MTM809 are as follows:

---
1.256B internal chip data memory, 10KB data SRAM, 64KB ROM and embedded I2C, SPI and UART/RS-232 interface, 2 on-chip ADC, RTC circuit.
--- 2. Fully compatible with USB2.0: High-speed (480Mbps) and full-speed (12Mbps) data transfer with multiple configurations and multiple interfaces, one device address and three endpoints.
--- 3. Support SM card / CF card / SD card / MMC card / xD card / MS (Pro) card / PC ATA card interface and micro hard disk / ATA / ATAPI device interface.
--- 4. An MP3 decoder with an I2S bus interface is embedded.
--- 5. With LCD interface.

Two MTM809 system structure
--- MTM809 system internal block diagram shown in Figure 1.

---
The following describes the main components of the MTM809 SOC:
--
-
1. Micro-controller
--- Microcontroller with single-cycle DCD 8051 as the core of the CPU, the main features are:
--- (1) Compatible with industry standard 80390 in software;
--- (2) Enhanced single-cycle reduced instruction system;
--- (3) 256B internal chip data memory, 10KB data SRAM, 64KB ROM;
--- (4) 15 interrupt sources have two priorities; have an interface with special function registers;
--- (5) Peripherals include: embedded I2C bus master controller, SPI bus master controller, three 16-bit timer/counters, two UARTs, four 8-bit GPIO ports and watchdog timer ;
--- (6) Support power management functions.

2. Switch Box
--- The switch box inside the MTM809 provides a channel for the transfer of large data between peripherals without the intervention of a microcontroller. The FLASH controller logic, the ATA controller logic, and the USB controller logic in Figure 1 all require DMA functionality, so DMA is built into these peripherals.

3. Various types of memory interfaces (Storage Interface)
--- FLASH memory interface is the bridge between FLASH card and other peripheral data exchange. On the one hand, it can communicate with each type of card, on the other hand, it enables the exchange of data between other peripherals. Between the FLASH memory interface and other peripherals is the MMU (Memory Management Unit).
--- ATA memory interface is the bridge between the hard disk UDMA, CF card controller and other peripheral interface data exchange.
--- USB interface is the bridge between USB packet manager and other peripheral interface data exchange.

4. Audio Logic Interface (Audio Logic Interface)
--- The internal decoder of the MTM809 decodes the MP3 data stream into PCM sample data and sends them to the audio buffer, which is then transferred to the off-chip DAC via the I2S bus. When the recording playback or test function is implemented, the microcontroller can directly write the audio sample data to the audio decoding interface.

5. Liquid crystal display (LCD) interface
--- Interface with support status LCD control / driver with dedicated EL backlight control pin.

Three-drive MP3 player system design
--- According to the analysis, the main function of the system is to extract the MP3 data stored in the hard disk, decode it to obtain the PCM data, and then transmit the data to the voice chip. The voice chip digital-to-analog converts the PCM data to obtain the analog signal through the amplifier output. Give headphones or speakers. At the same time, the system can be used as a large-capacity mobile hard disk.

---
Therefore, the system mainly includes two parts of the hard disk circuit and the MP3 playback circuit. In addition, in order to copy MP3 and other data from the computer to the hard disk, the system also needs a computer communication interface.

---
Since the MTM809 has embedded MP3 decoding logic inside, this brings convenience to our design. At the same time, we can also choose the on-chip voice chip with amplifier to make the system design more simplified. The Universal Serial Bus (USB) is a fast, flexible high-speed bus interface. Compared with other communication interfaces, the USB interface is characterized by its ease of use and wide application range. The MTM809 comes with a USB controller, so it is obvious that the USB interface is chosen as the interface between the system and the computer.

1. USB interface design
--- It is well known that before developing a USB device, first select the appropriate USB controller according to the specific use requirements. Currently, there are two main types of USB controllers available on the market: a single-chip microcomputer (MCU) with a USB interface or a pure USB interface chip. The MTM809 is an MCU with a USB controller that supports the USB 2.0 protocol, making the MTM09 very simple to design.

---
One USB interface has two data lines (DM, DP) and power lines (VCC, GND). The external interface lines of the MTM809 USB module are: DM, DP, UVDD, UVSS. When designing, just connect the data cable and the power cable. The USB interface design of MTM809 is shown in Figure 2.

2. Design of the hard disk subsystem
--- When selecting a hard disk, you should use a universal hard disk with a standard interface, and it is small in size, light in weight, large in capacity, and low in power consumption.

---
Hitachi's Travelstar series hard drives are designed for portable devices: low price; strong impact capability; small size (mm): 100 × 70 × 9.5 (length × width × height, 2.5 inches) Large capacity: 20 ~ 80GB; power consumption index is lower than 0.033 W / GB; simple interface: standard ATA interface.

---
Hitachi hard disk interface pin description is shown in Table 1.

---
MTM809 and hard disk interface design shown in Figure 3.

--- The
hard disk in the figure is set in the main operating mode (the CSEL pin is set high). In order to show whether the hard disk is working, a state display circuit composed of a PNP transistor and a light-emitting LED is designed by using the pin/DASP level when the hard disk is working.

3. MP3 playback circuit design
--- MTM809 chip integrates MP3 decoding circuit and data buffer. The interface of the off-chip DAC is I2S bus. At design time, a CODEC chip with an I2S bus interface should be selected. In the design, we chose the model number of the CODEC chip as WM8721. It is designed for portable MP3 audio and voice players/recorders: low power consumption and a signal-to-noise ratio of 100dB for voice playback. The internal earphone driver is integrated, and the control interface can be selected as a two-wire or three-wire serial bus interface.

--- When the
WM8721 package is 28-pin SSOP, the pin description is shown in Table 2.

---
The design between MTM809 and WM8721 is shown in Figure 4.

---
WM8721's working mode is set to slave mode, and its control interface is selected as three-wire MPU control interface (MODE is set to high level). The design uses the SPI bus interface of MTM809 (clock pin EECLK, data output pin EEDO, chip select pin EECS1) as the control interface of WM8721. The MTM809's I2S bus pins (ADO, ADI, AWS, ABCK, AMCK) are connected to the bus pins of the WM8721 in the manner shown in the figure. These pins are responsible for communicating with the WM8721 to transfer the decoded MP3 data to the CODEC. The digital and analog converted audio signals of the pins LPOUT and RPOUT of the WM8721 connect the two pins directly to the signal pins of the headphone jack.

references
1st Century Minsheng Company. MTM809 Datasheet, 2004
2 Bian Hailong et al. Design and development of USB2.0 equipment. Beijing: People's Posts and Telecommunications Press, 2004
3 Hitachi. Travelstra 4K40 Hard Disk Drives Datasheet, 2004
4 Wolfson Corporation. WM8721 Datasheet, 2004

HOT LED Light

Hongzhun Lighting Factory , http://www.gdflashlights.com