Hi Shahram, As I experienced implementation of very well working DTMF in TI C54x, you can try the following algorithm, which is a part of my decoder. I have it in assembler if you are interested : ;The accumulation of each filter output is endangered by a possible overflow. ;An early overflow is prevented with an additional gain control, which protects ;the Goertzel filters from strong signal inputs. This gain control operates on a ;buffer of input samples and estimates the peak amplitude of upcoming samples. ;If the estimation exceeds a desired peak amplitude, the input samples are attenuated, ;i.e. multiplied by a factor inverse proportional to the peak amplitude estimation. ; ; Description: ; ------------ ; Control gain of the input sample x(n) ; On a 8 samples length buffer of input samples, the average peak ; amplitude GAIN_amp is computed using the last 8 samples. The current ; input samples are then attenuated using the foll formulas: ; ; GAIN_const = (1/2)SQRT(2) ; GAIN_amp = GAIN_const*(1/8)*[abs(x(n))+abs(x(n+1))+...+abs(x(n+15))] ; ; if( GAIN_AMP > GAIN_THR ) ; y(n) = (GAIN_THR/GAIN_AMP) * x(n) ; else ; y(n) = x(n) ; ; The only thing you have to do then is to set correctly GAIN_THR (depending ; of your input signal caracteristic that you should know) Hope that helps. Regards, Franck HOCQUET Field Application Engineer EBV Elektronik Paris, FRANCE -----Original Message----- From: shahram heidari [mailto:] Sent: mardi 12 mars 2002 02:11 To: Subject: [speechcoding] DTMF Decoder Dear Friends I am working to simulation and implementation of multichannel dtmf encoder/decoder on ADSPs. I have found many documents and codes, which among them, TI's application notes is more completed. But in DTMF decoding stage before Goertzel Block the design should have a gain and amplitude control of input for preventation of variable in Goertzel algorithm. I converted this part of the TI's TMSC54x code to c++ but it is not sufficient and some overflow will happen. If each of you have any experince or idea, I will appreciate to propose me. shahram heidari Field Application Engineer BBS Electronics Pte Ltd Singapore _____________________________________ Note: If you do a simple "reply" with your email client, only the author of this message will receive your answer. You need to do a "reply all" if you want your answer to be distributed to the entire group. _____________________________________ About this discussion group: To Join: To Post: To Leave: Archives: http://www.yahoogroups.com/group/speechcoding Other DSP-Related Groups: http://www.dsprelated.com ">http://docs.yahoo.com/info/terms/ |
|
RE: DTMF Decoder
Started by ●March 19, 2002