I once wrote an autocorrelating DTMF decoder that worked pretty well. It worked very well in the presence of noise but it worked poorly when there was significant twist in the signal (one of the tones higher amplitude than the other). I correlated a zero crossing input against two tone references in real time, 8khz sample rate, taking one row and one column of the DTMF tones at a time, and 0 and 90 degree phase shifts of each tone. If interested I can send more details. :-Jim Scott Dattalo @MITVMA.MIT.EDU> on 05/18/2000 08:59:21 AM Please respond to pic microcontroller discussion list Sent by: pic microcontroller discussion list To: PICLIST@MITVMA.MIT.EDU cc: Subject: Re: DTMF Decoding with a PIC On Thu, 4 May 2000, Andy Kelley N1YEW wrote: > Hi, > > I have a weird idea on how to decode dtmf tones. It may work but then again it may not. > > 1. sample a tone to record it (@ 4kc sample rate or something). 2. then > store it. 3. then compare it to 'known' samples (samples taken during > calibration of pic/eeprom with identification(1,2,3,4,5, etc). 4. if it does > not match rotate the bits and try again going to step 3 until we get a > match(or until we run out of samples) 5. return with the tone > number(1,2,3,4,5,etc) in W. > > Think this will work or is it just a foolish idea? There are a few problems with this approach. The most significant is that you're not continuously sampling. Thus during your processing, a DTMF tone may be coming in and you'll miss it. Another problem is ensuring that the sample window is not a DTMF boundary. Another problem is phase shifting between the sampled tone and the recorded tone. How are you going to align or correlate the two signals/ If you care to see a technique that DOES work, then checkout: http://www.dattalo.com/technical/theory/dtmf.html I haven't publicly released the code to do this... But apparently scenix has copied this decoding technique and has released the code. Scott