|Another solution that's less brute forced, but probably not as accurate: |1) Same as (1) above |2) Feed the signal into a comparator and create a square wave. |3) Now the hard part. | I think you could easily (okay maybe not easily but) create 8 DFT type |square wave filters with self adjusting center frequencies. In other |words, create 8 phase locked loops. The time between edges in the square |wave can be used to control the center frequency. This is pretty close to what I did; the one notable difference is that I used three integrating square waves, 120 degrees apart, and after I accumulated all the signals, I looked for the largest difference bet- ween two of the square waves. The net effect is that the input "wave" is integrated with a signal that looks like this: ---- ---- ---- -- -- -- -- -- -- -- ---- ---- ---- [those really are discrete steps, and the positive/negative parts are twice as wide as the zero parts]. Note that this waveform is completely devoid of the 2nd, 3rd, and 4th harmonics; a little bit of analog filtering (using just R's and C's] will clean the upper harmonics out of the signal reasonably well. Anyway, I have done DTMF detection on a PIC and I can say that even with dirtball hardware it works well. CPU loading is pretty signif- icant, but on a 20MHz PIC there's still time to do other stuff. FWIW(PNM) the DTMF project is the only one with a 14-bit PIC where I actually ran out of stack space, and with a little tweaking I got things well under control (worst-case depth=6). If you need to be able to detect a wide variety of things of which DTMF is just one flavor, the PIC-based approach has a lot to recommend it; if all you need is DTMF, though, a dedicated chip may be a better approach (if you don't mind running your PIC off 3,579,545Hz you can even share the crystal!)