【正文】
i=0。 data[0]=buf1[0]/2+buf2[0]/2。/*尋找產(chǎn)生DTMF的初始條件*/ b=find2(n)。 data[i]=0。 /*12dB gainon analog output from DAC*/ codec_sample_rate(hHandset,SR_8000)。 brd_led_toggle(BRD_LED2)。 task=0。,39。,39。,39。signed short data1 [128]。,39。,39。,39。float find2(char n)。z[1]==1amp。k3=(m+4)*2。j128。j14。}當持續(xù)時間完畢時,持續(xù)時間變量復位,然后切換任務標志為0,然后返回。i++){buf1[i]=(a*buf1[i1])*2buf1[i2]。設計程序如下: while(task==1){buf1[0]=y1。data[i]=0。 DTMF信號產(chǎn)生開 始任務判決任務標志=0?靜音任務持續(xù)時間完畢?持續(xù)時間完畢? 雙音任務持續(xù)時間變量復位切換任務標志=1裝入下一個數(shù)字初始化新數(shù)字的振蕩器系數(shù)與初始條件持續(xù)時間變量減1產(chǎn)生靜音樣本返回持續(xù)時間變量減1持續(xù)時間變量復位切換任務標志=0產(chǎn)生雙 音樣本 圖:DTMF信號編碼流程圖首先進行任務判決,判斷任務標志是否為零,如果是零則進行靜音任務。l 條件存儲指令。l 指數(shù)編碼器可以在單個周期內(nèi)計算40位累加器中數(shù)值的指數(shù)。但式(E13)中的程序僅當n=N時計算一次,每迭代需要一次實數(shù)乘法和兩次加法。 其余時間為靜音信號, 用以區(qū)別兩個DTMF數(shù)字信號。為應用方便可以通過選取初值而避免將一個δ脈沖作為輸出條件。但在串、并列組合時要特別注意的是合理選擇所使用的音頻頻率,有效減少二次諧波所產(chǎn)生的寄生干擾,以減少誤碼。(1)并列發(fā)送并列發(fā)送是同時發(fā)送幾個頻率。這兩個音頻信號的頻率來自兩組預分配的頻率組:行頻組或列頻組。在過去的短短的二十來年里,DSP處理器的性能得到很大改善,軟件和開發(fā)工具也得到相應的發(fā)展,價格卻大幅度地下降,從而得到越來越廣泛的應用。 Goertzels functions and flexibility, but reduces the costs and overes the shortings of the hardware detection circuit.Keywords: DigitalDTMF信號是音頻電話的撥號信號。 DTMF(雙音多頻)技術(shù)是DSP技術(shù)中的一種。 second is using DTMF signaling to control the various actions of telephone. Implementing these features can’t be apart from the generation of DTMF signals and the identification of correct detection, which is easily solved after the appearance of dedicated digital signal processing chip (DSP).This paper presents a realization of the program, describing the basic principle of the generation and detection of DTMF signaling that is using two secondorder digital sinusoidal oscillator to produce DTMF signal, and through the Goertzel algorithm for DTMF signaling detection. This paper is based on DSP chip fixedpoint TMS320C54x series from TI Company to achieve DTMF signaling detection. The usage of DSP technology not only increases the system39。sinusoidal oscillator信息化已經(jīng)成為社會發(fā)展的大趨勢,信息化是以數(shù)字化為背景的,而DSP技術(shù)則是數(shù)字化最重要的基本技術(shù)之一。 一個DTMF信號由兩個頻率的音頻信號疊加構(gòu)成。音頻組合信號發(fā)送方式:有并列發(fā)送、串列發(fā)送及串并發(fā)送。優(yōu)點是編碼容量大,且呼叫時間有不長。jω0其單位脈沖應為h (n) = sin ( (n + 1) ω)* u (n) (E2)系統(tǒng)差分方程為y (n) = a1y (n 1) a2y (n 2) b0δ(n) , (E3)其初始條件為y ( 1) = y ( 2) = 0。根據(jù)CCITT 規(guī)定,DTMF信令每秒最多10個數(shù)字, 也就是周期為100ms, 其中DTMF信號的持續(xù)時間不少于45ms, 不大于55ms。對n=0,1,…,N,式(E12)中的遞推關(guān)系可迭代進行。l 比較、選擇、存儲單元(CSSU)用于Viterbi操作的假發(fā)/比較選擇。l 并行存儲和并行加載的算數(shù)指令。l 可編程定時器。buf2[i]=0。}當進行任務判決時,如果任務標志不是零則進行雙音任務。i128。}timer=timer1。/*采樣128個樣點*/對八個頻譜分別計算vkn=xn+2cos2πkNvkn1vkn2 0≤n≤N程序設計:for(j=0。中間變量清零程序設計:for(j=0。 k2=k+1。amp。float find1(char n)。139。539。939。int a[14]。139。539。939。 timer=45。*/ delay(1000)。 /*6dB gain onanalog input to ADC*/ codec_aout_gain(hHandset,CODEC_AOUT_MINUS_12dB)。 buf2[i]=0。 a=find1(n)。 buf2[1]=(b*y2)*2。/*產(chǎn)生DTMF*/ } i=0。/*檢測DTMF*/ printf(n=%c\n,n1)。139。||n==39。839。||n==39。||n==39。539。||n==39。*39。439。||n==39。339。 } else { printf(error\n)。739。||n==39。639。}void delay(signed short period){ int i,j。 float d[14]={, 2,}。i++) { y[i]=data[i]/1024+2*d[j]*y[i1]y[i2]。 k3=(m+4)*2。z[1]==1am