0 Introduction
With the development of modern electronic technology, the development of interface technology is also becoming more and more rapid, and the USB interface has developed and grown in such a background. 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, which reads various USB devices through the USB interface and reads 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 a full hardware audio system with intelligent multi-interfaces, 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 multiple uses of one device. 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 computer frequency reduction to reduce the power consumption of the entire system to about 50% of traditional similar equipment, which is in line with my country's theme of energy conservation and environmental protection.
1 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 microcontroller systems to read and write files in USB flash drives or SD cards. CH376S supports USB device mode and USB host mode, and has built-in basic firmware for USB communication protocols. Firmware that handles the dedicated communication protocol for Mass-Storage devices; SD card communication interface firmware and FATl6, FAT32 and FATl2 file system management firmware support commonly used USB storage devices and SD cards.
VSl053B 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, with 16 KB of instruction RAM and 0.5 KB of data RAM. VSl053B has a 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 buffers are used for USB bulk data transmission. Automatic handshake mode can be used for serial communication, so that the baud rate can be achieved much higher than that of standard UART controller. PL2303 supports USB power management and remote wake-up protocol. In this design, the PL2303 chip is mainly used to combine the download line of the main control unit and the power supply module into one, which greatly simplifies the design complexity of the system. The NOKIA 5llO LCD display is a traditional dot matrix LCD display without built-in English and Chinese character fonts. Therefore, in the process of NOKIA 5llO LCD display, the microcontroller is required 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 indication module, and 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.
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 operation flow is shown in Figure 4, and the software system flow chart is shown in Figure 5.
2 Software System Design
The whole design operation is shown in Figure 6 and Figure 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 is a 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 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 and the intelligent interface solution can flexibly read and write various storage devices, further improving resource utilization, the system has certain social value and development prospects.
Previous article:Design of remote temperature difference cycle controller based on ATmega16
Next article:Anti-interference design of small heating furnace control system using AVR single chip microcomputer
Recommended ReadingLatest update time:2024-11-16 21:54
- Popular Resources
- Popular amplifiers
- Virtualization Technology Practice Guide - High-efficiency and low-cost solutions for small and medium-sized enterprises (Wang Chunhai)
- usb_host_device_code
- Image acquisition and processing system for panoramic map applications
- Teach you to learn 51 single chip microcomputer-C language version (Second Edition) (Song Xuefeng)
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
- MSP430G2553 Software UART and Hardware UART and Jumper Settings
- The "backplane problem" is broken down, let's see how we catch the monster
- Learn 3D visualization from scratch: Camera "sweet spot"
- Optimization of CCS for TMS320C66x
- What are the definitions of Alternate and Remap in the manual?
- Recommended "Intelligent Sensor Systems: Emerging Technologies and Their Applications", those who are interested in sensors can take a look
- diode
- 【GD32L233C-START Review】WS2812B Display Driver
- Diwen 86 box data sharing
- Avoiding ESD and EMI in mobile audio systems