Application of TMS320C6713DSP in Music Fountain Control System

Publisher:Huanle666Latest update time:2009-09-23 Source: 微计算机信息Keywords:DSP Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

introduction

The musical fountain is a combination of modern technology and art. It uses fountains to express the beauty of music, which is pleasing to the eye. At present, many units have launched their own musical fountains, which have achieved good results. However, looking at these sound control products, some use the time domain changes of music to control the fountain, and some divide the music into several frequency bands to control the flower pattern of the fountain, and most of them use low frequency, medium frequency and high frequency bands for control. The disadvantage is that none of them can show the music well in the frequency domain, so it cannot well reflect the connotation of music. In response to these problems, this design proposes a new method to control the changes of the fountain, and to show the spectrum of music in real time by the height of the fountain water column.

Overall Design

First, the audio signal is preprocessed by amplification, filtering, sampling and A/D conversion. After the DSP performs Fourier transform on the audio signal, the spectrum of the audio signal can be obtained, that is, the intensity of the sound signal corresponding to each frequency. Through the frequency conversion control system, the spectrum diagram can be expressed as a fountain water column. The height of the water column reflects the amplitude of the audio signal in a linear proportion. Assuming that the number of samples of the audio signal each time is n, the overall structure of the system is shown in Figure (1).

System overall structure diagram

Figure 1 Overall design block diagram

Specific design

Introduction to Chips and Functional Modules

TLV320AIC23 (AIC23 for short) is a high-performance multimedia digital voice codec. Its internal ADC and DAC conversion modules have complete digital filters. There are 11 16-bit registers inside, and the control interface has SPI and I2C working modes. The data transmission width can be 16, 20, 24 and 32 bits, and the sampling frequency range supports from 8kHz to 96kHz. When the ADC acquisition reaches 96kHz, the noise is 90-dBA, which can save audio signals with high fidelity. When the DAC conversion reaches 96kHz, the noise is 100-dBA, which can play back high-quality digital audio.

TMS320C6713 is a high-speed digital signal processor (DSP) produced by TI. It adopts advanced very long instruction word (VLIW) structure, can execute 8 32b instructions per clock cycle, the highest clock frequency can reach 300MHz, and the minimum instruction cycle is 3.3ns. The chip has rich on-chip memory resources and a variety of on-chip peripherals. The maximum external total memory address space is 512MB, the data width is 32b, and it can support SBRAM, SDRAM, SRAM, FALSH and EPROM.

TMS320C6713 has two multi-channel buffered serial ports (McBSP), which can be easily used to complete the control and communication of AIC23.

Hardware Hookup

Connection between TMS320C6713 and TLV320AIC23

The two multi-channel buffered serial ports of TMS320C6713 are configured in I2C mode and SPI mode respectively. McBSP0 is used as the data transmission port, and McBSP1 is used as the control port to write control words to AIC23. The hardware connection diagram of TMS320C6713 and AIC23 is shown in Figure 2.

Hardware connection between TMS320C6713 and TLV320AIC23

Figure 2 Hardware connection between TMS320C6713 and TLV320AIC23

Design of frequency conversion control system

The frequency conversion control system is composed of a frequency conversion controller, a frequency conversion distributor and a frequency converter. For a control system with less than 8 channels, the frequency conversion control system can adopt the control method shown in Figure 3.

Frequency conversion control system

Figure 3 Frequency conversion control system

The music signal processed by DSP is automatically converted into the 4~20mA DC current signal required by the frequency converter. The output DC current signal is linearly related to the input music signal, so that the height of the fountain changes with the size of the music signal.

For the control of more than 8 channels of multi-channel fountains, the requirements can be met by expanding the functions of the music fountain controller and the frequency conversion demonstrator. DSP is the control center of the frequency conversion music fountain control system, and will be expanded to 4 channels in the future, namely 4 channels, 8 channels, 12 channels, 16 channels, and so on. Each channel controls a frequency conversion speed regulator, converting the music signal into a 4~20mA DC current signal that the frequency conversion speed regulator can accept, to drive the frequency conversion speed regulator, so that the spray height of the fountain changes with the size of the music signal.

Software Implementation

Presidential Software Design

First, initialize the McBSP0 and McBSP1 ports, configure AIC23, and then start the A/D conversion of AIC23, sample the analog audio signal input by the microphone, and then perform Fourier transform on the sampled audio signal. The overall flow chart is shown in Figure 4. The formula of discrete Fourier transform (DFT) is shown in Formula 1. In order to perform fast Fourier transform, the time extraction (DIT) radix 2FFT algorithm is adopted.

formula

Overall flow chart

Figure 4 Overall flow chart

Perform FFT transformation on the N-point audio signal. From Formula 1, we know that the corresponding frequency domain is also N points. Let the frequency corresponding to the k-th point in the frequency domain be fk, and its calculation formula is shown in Formula 2. Among them, fs is the sampling frequency of the audio signal, f'k is the normalized frequency, and the calculation formula of f'k is shown in Formula 3. Therefore, from Formula 2 and Formula 3, we can get the actual frequency value corresponding to each sampling point on the spectrum diagram.

formula

Audio data collection

1. Sampling frequency

According to the sampling theorem, the sampling frequency should be at least twice the sampling sound frequency. Since the human ear can sense frequencies of approximately 20Hz~20kHz, in theory, the best sampling frequency is 40kHz. In practice, due to equipment reasons, the sampling frequency is generally 10% higher, that is, 44kHz. Since AIC23 supports 44.1kHz, the sampling frequency in this design is 44.1kHz.

2. Sample size

The sample size determines the difference between the lowest and highest amplitudes of the sound that can be recorded, and represents the quantization size of the sample. The intensity of the sound is proportional to the amplitude of the sound. Like the frequency, the human ear's ability to perceive the intensity of the sound is not a linear relationship, but a logarithmic relationship, which is often expressed in dB (decibel). The definition of dB is: 20log(A1/A2), A1, A2 are the two amplitudes of the sound.

When the size is 8 bits, the ratio of the maximum and minimum amplitudes of the sound is 256, then: 20log(256)=48dB, when the size is 16 bits, then the ratio of the maximum and minimum amplitudes of the sound is 65536, then: 20log(65536)=96dB. At this time, the maximum sound intensity is close to the limit of the human ear. In this design, the sample size is 16 bits.

3. Implementation of data collection

The program design steps are as follows:

a) Initialize multi-channel buffered serial ports 0 and 1.

The initialization of the multi-channel buffered serial port is completed by configuring its registers. Serial port 0 is configured in mode, and the registers of serial port 0 are configured as follows: serial port configuration control register SPCR = 0xC30003; interface control register PCR = 0x03; receiving control register RCR = 0x0140; sending control register XCR = 0x0140. Serial port 1 is configured in SPI mode, and the registers of serial port 1 are configured as follows: serial port configuration control register SPCR = 0xC51000; interface control register PCR = 0xa0a; receiving control register RCR = 0; sending control register XCR = 0x10040.

b)Configure TLV320AIC23

AIC23 has 11 16-bit registers inside. In these 16-bit control words, B[15-9] is the register address, and B[8-0] is the data to be written into the register. The values ​​written into these 11 registers for this design are as follows: Left channel input control = 0x17; Right channel input control = 0x17; Left headphone channel control = 0x7f; Right headphone channel control = 0x7f; Analog audio channel control = 0x1c; Digital audio channel control = 0x1; Start control = 0; Digital audio format = 0x4f; Sample rate control = 0x3f; Digital interface activation = 0x01; Initialization register = 0.

c) Start the conversion, perform A/D conversion, and store the converted data in the internal memory of the DSP, using 128 points each time.

Examples

Figure 5 is the spectrum waveform of the audio signal simulated in the DSP software environment CCS2.0, and Figure 6 is the time domain waveform of the audio signal. The number of samples per time is 128, the sampling frequency is set to 44.1kHz, and the sample size is 16 bits.

Audio signal spectrum

Figure 5 Audio signal spectrum

Audio signal time domain waveform

Figure 6 Audio signal time domain waveform

Conclusion

This paper presents a new design of a musical fountain, and proposes a method to display the spectrum of the music signal by changing the height of the fountain water column. It uses the advantages of DSP and audio codec chips in audio signal processing and applies them well to the music fountain system. The software programming and hardware system design of the interface between TMS320C6713 and audio codecAIC23 are elaborated in detail. This solution has achieved good results when running the simulator in the Code Composer Studio (CCS2.0) environment for software and hardware joint debugging, which proves the success of the design and the feasibility of the solution. This solution can not only be used as the front-end control system design of the music fountain, but also as a model of a portable audio signal spectrum analyzer if an LCD display and some control circuits are added.

Keywords:DSP Reference address:Application of TMS320C6713DSP in Music Fountain Control System

Previous article:Design of data communication between OMA-L137 and ADS1178 based on CPLD
Next article:Multi-IP Core Integration Method for Cryptographic Algorithms in Security Chips

Recommended ReadingLatest update time:2024-11-16 18:04

Design of high-power switching power supply based on DSP
 The high-power and high-frequency switching power supply based on DSP introduced in this article fully utilizes the powerful functions of DSP, can control the switching power supply in many aspects, and can simplify devices, reduce costs, reduce power consumption, and improve equipment reliability.    1. Overall po
[Power Management]
Design of high-power switching power supply based on DSP
Design and implementation of spectrum monitor based on FPGA+DSP
With the extensive development of microwave technology, the electromagnetic environment in space and on the ground is becoming more and more complex. As a kind of public resource, radio spectrum resources need to be effectively allocated and monitored by spectrum management departments. Especially in the case of incre
[Embedded]
Design and implementation of spectrum monitor based on FPGA+DSP
Design and implementation of ultra-high-speed frequency-hopping system baseband based on DSP/FPGA
As an important type of spread spectrum communication system, the frequency hopping communication system has been widely used in the military and civilian communication fields for its excellent anti-far effect and anti-interference capabilities. The frequency hopping communication method refers to the carrier being co
[Embedded]
Design and implementation of ultra-high-speed frequency-hopping system baseband based on DSP/FPGA
Design of asynchronous motor control system development platform based on DSP+CPLD
With the continuous development of power electronics technology, motor control theory and microcontrollers, modern AC speed control technology has been widely used in the national economy. At present, high-performance speed control strategies and modern control theories have been gradually applied to the field of AC mo
[Embedded]
Design of asynchronous motor control system development platform based on DSP+CPLD
Using DSP to realize the subdivision of incremental photoelectric encoder
1 Introduction At present, grating devices are widely used as sensitive elements for speed and position measurement in various servo drives and their applications. In addition, two orthogonal square waves are widely used, and the real-time performance of the system is extremely high. Therefore, for the main processi
[Test Measurement]
Using DSP to realize the subdivision of incremental photoelectric encoder
DSP Programming Tips 2: Unveiling the Mystery of Compilers and Processor Options
  Maybe you have been using CCS for many years, but when a cl2000-related error occurs one day, you are suddenly confused; for example, if you use an old version of  CCS that does not support C2000 FPU to compile a 28335 program, cl2000 will prompt you that it is not supported and then report an error and will
[Embedded]
Design of DSP asynchronous serial communication based on VK3366
With the continuous development of digital signal processing technology and integrated circuit technology, the reliability of digital signal processors is getting higher and higher, and their applications are becoming more and more extensive. In DSP application systems, DSP usually needs to receive control signals fro
[Embedded]
Design of DSP asynchronous serial communication based on VK3366
Design of railway crossing image monitoring system using DSP
At present, there are basically three types of railway crossings: manned, manned and unmanned. For a long time, the railway department has invested a lot of manpower and material resources in manned and manned crossings, and has taken safety measures. In particular, the technical equipment of manned crossings with a
[Security Electronics]
Design of railway crossing image monitoring system using DSP
Latest Embedded Articles
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号