Introduction
The application of digital technology has penetrated almost every corner of modern science and technology, and digital audio technology is one of the most widely used fields. Now a large number of digital audio devices are quite mature, and it has become a trend to use software to realize different functions on the existing hardware platform. The flexibility of software programming provides convenience for adding different functions to many devices. Like other digital systems, DSP systems have many advantages that analog systems do not have, such as flexibility, programmability, support for time division multiplexing, easy modular design, reusability, high reliability, etc. With the development of DSP technology, more and more devices are based on
DSP
. Development and application based on DSP technology is becoming a trend in the field of application technology in the digital age.
In real life, when a sound source encounters an object, reflection generally occurs. The reflected sound waves are transmitted together with the source sound waves. The listener will find that the reflected sound waves are slower than the source sound waves, thus forming an echo. Now, after knowing a digital sound source, a computer can also be used to simulate the echo effect through digital calculation. Simply put, the echo effect is achieved by superimposing a delayed sound stream on the original sound stream. The echo generated in this way is called digital echo.
1 Introduction to main components
The TLV320AIC23 used in this design is a high-performance multimedia digital voice codec produced by TI. Its internal ADC and DAC conversion modules have complete digital filters. Its data transmission width can be 16, 20, 24 and 32 bits, and the sampling frequency range is 8 to 96 kHz. The control register of the device can be edited through the control interface, and it can support both SPI and I2C control modes. The control mode of TLV320AIC23 is determined by the MODEM pin, and this system uses I2C mode.
TMS320VC5509A is a new generation product in TI's C5000 DSP series. This DSP has a good inheritance of C54X and is compatible with C54x source code, thus effectively protecting the user's investment in software. TMS320VC5509A has low power consumption, low cost, and can maintain the best performance under limited power conditions.
2 System Design
2.1 System Working Principle
The I2C interface module in the echo system consists of serial data SDA and serial clock SCL, both of which are bidirectional interfaces. I2C devices connected to the same bus can work in multi-master mode. Each I2C device, including the TMS320C55x DSP, has a unique device address for software addressing. Among them, the master device is used to send the clock and start data transmission, and the slave device is addressed by the master device. These devices can act as both transmitters and receivers according to their respective functions.
When the system is initialized and configured, the DSP sends the configuration command to the TLV320AIC23 through the I2C bus, and the TLVAIC23 starts working after the configuration is completed.
For the DSP's multi-channel buffered serial port (MCBSP) setting, since the TLV320AIC23 samples and outputs serial data, it is necessary to coordinate the serial transmission protocol of the DSP that matches it. Therefore, the DSP's serial port must be set correctly. The MCBSP serial port can generally connect the data path and control path to external devices through six pins. Data communication with the external device through the MCBSP serial port is generally transmitted through the DR and DX pins, and the control synchronization signal is completed by four pins such as CLKX, CLKR, FSX, and FSR. Since the data lines DR and DX of the MCBSP serial port have cache registers, and the frame synchronization signals FSX, FSR and the clock signals CLKX, CLKR are all programmable, the interface design between it and the TLV320A-IC23 is very flexible. From these features, we can see that by setting the MCBSP serial port to SPI mode and synchronizing the serial port receiver and transmitter, and then starting serial port transmission with the frame synchronization signals LRCIN and LRCOUT of the TLV320AIC23, and setting the data word length for transmission and reception to 32 Bit (16 Bit for the left channel and 16 Bit for the right channel) single frame mode, seamless connection with the TLV320AIC23 can be easily achieved.
When a voice signal is input, the TLV320AIC23 first collects the input voice signal through the AD conversion, and sends the data to the McBSP interface of the DSP after collecting each signal so that the DSP can read the voice data. Each data is a 16-bit unsigned integer, with one value for each left and right channel.
When the voice signal is output, the DSP can send the voice data to the TLV320AIC23 through the McBSP interface, and then the DA device of the TLV320AIC23 converts them into analog signal output.
2.2 Hardware Circuit Design
The TLV320AIC23 can operate at both digital and analog voltages and is compatible with the I/O voltages of the TMS320C55x DSP, thus enabling seamless connection to the McBSP (multichannel buffered serial port) port of the C55x DSP to simplify system design.
In the system, the main clock 11.2896MHz of TLV320AIC23 is directly generated by the DSP clock. MODE is connected to the digital ground to indicate the use of the I2C control interface to control the transmission of TLV320AIC23 data. SCLK and SDIN are the shift clock and data input terminals of the TLV320AIC23 control port, which will be connected to the I2C module ports SCL and SDA of TMS320VC5509 respectively. The MCBSP0 of TMS320VC5509A should work in SPI mode, so that the receiver and transmitter of MCBSP0 can be synchronized. The transmit and receive clock signals CLKX0 and CLKR0 are provided by the serial data transmission clock BCLK of TLV320AIC23, and the serial port data transmission is started by the frame synchronization signals LRCIN and LRCOUT of TLV320AIC23. DX0 and DR0 are connected to DIN and DOUT of TLV320AIC23 respectively, which can be used to complete the digital communication between DSP and TLV320AIC123.
2.3 Software Design
The software of this system mainly consists of two parts: program and digital echo processing program. The main program mainly completes the initialization of the system, such as EMIF (external memory interface), CPU frequency, TLV320AIC23 initialization, etc. After completion, the digital echo module is called in a loop; the digital echo module is mainly used to initialize the voice buffer and working variables, read and save voice data, and then read back the saved data according to the delay parameters, and output the final voice data to McBSP0 according to the sound effect parameters and the current sound reverberation.
When writing to the TLV320AIC23 register, please note:
(1) After writing the I2C address once, you can only write to one register, but not all registers at once. In other words, you must write the I2C address step by step before writing to each register.
(2) In I2C mode, data is written in three 8-bit blocks, and the TLV320AIC23 has a 7-bit address and 9-bit data. In other words, the highest bit of the data item needs to be added to the last bit of the second 8-bit block.
(3) When programming the control registers, corresponding to each change in the working status, you cannot simply modify the value of a certain register, but you must rewrite all ten registers. Otherwise, the system will not work properly. In addition, you should first write 0 to the initialization register to start initialization, and at the same time, all registers should be reset.
2.4 Realization of system effects
During programming, when you choose to make a digital echo, you can also set two parameters, delay and effect. In this way, when the echo is generated, you can adjust these two parameters separately to adjust and control the delay and loudness of the echo. When the system is working, if there is sound input in the microphone, we can hear two sounds in the receiver, one of which is the original sound, and the other is the digital echo. The delay and strength of the digital echo can be determined by the parameters delay and effect.
If necessary, appropriate program design can be used to achieve double echo, triple echo, etc. based on this system, and multiple echo effects in real scenes can also be simulated.
3 Conclusion
Since the 1990s, the development of DSP chips has been rapid. Its functions have become increasingly powerful, its cost performance has been continuously improved, and its development methods have been continuously improved. DSP chips have become the fastest growing electronic products in integrated circuits. DSP chips have quickly become the core components of many electronic products, and DSP systems have also been widely used in various fields of today's technological revolution. It can be said that the development and application based on DSP technology is becoming a trend in the field of applied technology in the digital age. This system is just an example of the application of DSP systems.
Previous article:Design of SOPC Technology Based on DSP
Next article:TMS320F280x implements analog output controller
Recommended ReadingLatest update time:2024-11-16 15:19
- Popular Resources
- Popular amplifiers
- Huawei's Strategic Department Director Gai Gang: The cumulative installed base of open source Euler operating system exceeds 10 million sets
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- What are the functions of the Internet of Vehicles? What are the uses and benefits of the Internet of Vehicles?
- Power Inverter - A critical safety system for electric vehicles
- Analysis of the information security mechanism of AUTOSAR, the automotive embedded software framework
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
- Agitek case sharing - Metrology and testing demonstration case of automotive electronic modules
- How to turn off MPLAB XIDE's code optimization function
- IoT Smart Parking Solutions
- EPWM1 A and B pulses are not complementary
- Find the parameters of the low-pass filter
- Bone vibration sensor and high-quality voice calls (including working principles)
- Millimeter wave sensors
- New Year's flavor competition, post photos during the New Year to win gifts~~
- C language function interrupt function
- NUCLEO_G431RB Review - First Experience