A solution for an AVR single-chip intelligent multi-interface full hardware audio system

Publisher:龙腾少年Latest update time:2011-11-14 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

0 Introduction
In the traditional hardware architecture, the interface is regarded as a part of the corresponding external device, and each interface can generally only be connected to the same device. Although several devices of the same type can be connected to the same interface through the so-called "daisy chain" method, different types of devices cannot be mixed and connected to the same interface. As the number of devices with USB interfaces is increasing, in order to meet such needs, a USB 2.0 interface solution is given here to read various USB devices through the USB interface and various mainstream memory cards through the SD card interface. This solution supports commonly used USB storage devices (including U disk/USB hard disk/USB flash drive/USB card reader) and SD cards (including standard capacity SD cards and high capacity HC-SD cards as well as protocol-compatible MMC cards and TF cards).

This paper proposes a solution for an intelligent multi-interface full hardware audio system, which further enhances the scalability of the audio system. In principle, it can connect most of the current mainstream storage devices, realizing the expansion of a device for multiple purposes. It can further improve the utilization rate of existing resources, has certain economic and social benefits, and adopts power consumption control methods such as full hardware decoding and single-chip microcomputer frequency reduction to reduce the power consumption of the entire system to about 50% of traditional similar devices, which is in line with China's energy conservation and environmental protection theme.

l Hardware system design
1.1 Chip Overview
ATmegal28 is a low-power 8-bit CMOS microcontroller based on an enhanced AVR RISC structure. Due to its advanced instruction set and single-clock cycle instruction execution time, the data throughput of ATmegal28 is as high as 1 MIPS/MHz. The AVR core has a rich instruction set and 32 general-purpose working registers. All registers are directly connected to the arithmetic logic unit (ALU), so that one instruction can access two independent registers simultaneously in one clock cycle. This structure greatly improves code efficiency and has a data throughput of up to 10 times that of ordinary CISC microcontrollers.
CH3768 is a file management control chip, used for single-chip microcomputer system to read and write files in USB disk or SD card. CH376S supports USB device mode and USB host mode, and has built-in basic firmware of USB communication protocol. Firmware for processing the dedicated communication protocol of Mass-Storage mass storage devices; SD card communication interface firmware and FAT16, FAT32 and FAT12 file system management firmware support commonly used USB storage devices and SD cards.
VS1053B is a single-chip Ogg Vorbis/MP3/AAC/WMA/MIDI audio decoder and IMA ADPCM/user-loadable Ogg Vorbis audio encoder, supporting CD-level audio
playback and recording. The chip contains a high-performance, low-power DSP processor core VS_DSP, including 16 KB instruction RAM and 0.5 KB data RAM. VSl053B has 1 serial control and data input/output interface, 8 GPIO interfaces, high-performance variable sampling rate DAC and ADC, stereo audio input interface and stereo audio output interface. PL2303 is used to realize the conversion between USB and standard RS 232 serial port. Two independent large buffers are used for the connection of two buses. Large data buffer is used for USB bulk data transmission. Automatic handshake mode can be used for serial communication, so it can reach a baud rate far greater than that of standard UART controller. PL2303 supports USB power management and remote wake-up protocol. In this design, PL2303 chip is mainly used to combine the download line and power supply module of the main control unit into one, which greatly simplifies the design complexity of the system. NOKIA 5llO LCD display is a traditional dot matrix LCD display without built-in English and Chinese character library. Therefore, in the process of NOKIA 5llO LCD display, the microcontroller needs to convert the ASCII code value read from the memory into the corresponding English and Chinese character dot matrix information, and then transmit the dot matrix information to the LCD display through the serial port for display.
1.2 Hardware Design Block Diagram
The hardware system is mainly composed of the main control module, intelligent expansion interface, audio codec module, LCD display module, keyboard LED indicator module, JTAG/ISP/RS 232 download interface. The logical connection diagram is shown in Figure 1.


1.3 Interface design
1.3.1 VS1053B and keyboard and LCD display interface design
KEY1~KEY7 are the keyboard control units of the system, and their corresponding functions are shown in Table 1. LED1~LED7 correspond to key indicator lights. If key KEY1 is pressed, LED1 lights up. The peripheral interface is shown in Figure 2.

[page]

1.3.2 USB host device interface design
The interface design of the USB host device is shown in Figure 3.
The system software design mainly includes the main program, interrupt control subroutine, keyboard scanning subroutine, LCD control subroutine, and peripheral module control program. The main program running flow is shown in Figure 4, and the software system flow chart is shown in Figure 5.



2 Software System Design
The entire design operation is shown in Figures 6 and 7.

3 Conclusion
Through this design, the control function of the single-chip microcomputer in the intelligent multi-interface design and the processing method under multiple interrupts are further enhanced. In the single-chip microcomputer application system, the function of human-computer dialogue is usually required, and data can be input at any time, and various corresponding control commands can be issued, and finally the operation results are output to the LCD display through the output interface. Since the LCD display of this design belongs to the traditional LCD display and does not have any built-in font library, it is necessary to read the Chinese character dot matrix information in the SD card Fat file system through the single-chip microcomputer, convert ASCII into the corresponding dot matrix information, and then display it, which further increases the difficulty of system control.
Since the system can make secondary use of existing resources, the solution using intelligent interfaces can flexibly read and write various storage devices, further improving the utilization rate of resources, so the system has certain social value and development prospects.

Reference address:A solution for an AVR single-chip intelligent multi-interface full hardware audio system

Previous article:Design of electricity management system for student apartments based on PL3000 single chip microcomputer
Next article:Application Design of AVR Single Chip Microcomputer in Perpetual Calendar

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号