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.
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
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
- A brief explanation of FPGA static timing analysis
- [TI star products limited time sale] + Buy, buy, buy!
- [Xianji HPM6750 Review] CoreMark running test
- Huawei Electromagnetic Compatibility Structural Design Specification V2.0
- TMS320F28035 timer interrupt routine
- [TI mmWave Radar Evaluation] 5+AWR1443 EVM Board Sensitivity (Minimum Distance) Test and Summary
- 【ESP32-S2-Kaluga-1 Review】Getting weather information via https
- LE audio, Bluetooth positioning, Bluetooth mesh... Where will the next technological explosion point of Bluetooth be? ?
- RAM is equivalent to the computer's running memory. Can the memory stick also be expanded?
- LPS25HB Barometric Pressure Sensor PCB Package and Code