Q>does anyone knows if theres a uC capable of decoding DTMF?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Q>does anyone knows if theres a uC capable of decoding DTMF?

2,392 Views
daistar
Contributor I
Hi, anyone knows if there's a uC that has a capability or feature like DTMF decoding or DTMFreceiver????tnx in advance....
Labels (1)
0 Kudos
7 Replies

563 Views
Blaise34
Contributor I
If You think You can have a look at http://www.circuitcellar.com/library/print/0506/Debbasch-190/index.htm
In this articel the author does DTMF demodulating by software.

Alban is right, S08 is might not be the best choice for this task. In this articel an ARM was used.
But the code probably can be ported to any other core.

Best wishes,
Blaise
0 Kudos

563 Views
Alban
Senior Contributor II
Hello,

Yes, if you read Freescale Forums, you will see we talked about this recently.
There are software available for different kind of MCU.

Still, a DSP is more up to the job than an S08.
It is easy on DSP with dedicated signal instructions the S08 does not have.

Otherwise, you can do DTMF decoding with an external specialized IC. See ONSemiconductor for this.
Motorola stopped doing these quite a while ago and created ONSemi.

Cheers,
Alban.
0 Kudos

563 Views
mke_et
Contributor IV
I'm not sure this is appropriate or even valid, but a number of years ago a guy told me he did a DTMF decoder in a Z80 device by doing (lets see if I get this right) a slice out of a 'sliding window fourier transform'. I guess that by the sliding window he mean doing the function over a fixed window in data and throwing out the glitch to start it.

But I never bothered to look into it any more than that. And if fact he may have been blowing wind.

Topic for discussion? Or put it into the fire with the rest of the trash?
0 Kudos

563 Views
rocco
Senior Contributor II
Hi All,

mke_et wrote:
. . . he did a DTMF decoder in a Z80 device by doing (lets see if I get this right) a slice out of a 'sliding window fourier transform'.

I thought about an FFT when this thread was opened, but I don't have any code that might help, so I didn't post.

This is a valid approach, and it is the approach I would take if I had to do DTMF. In operation, eight of the FFT's bins could be either full or empty, depending on whether the corresponding tone was present or not. The challenges are not trivial for a S08, although it would be child's play for a DSP.

First, to satisfy Nyquist criteria, you would need to sample at 3.3khz or higher (the highest tone is 1633hz). That would be a sample approximately every 300 microseconds. But you would need an anti-aliasing filter that cuts-off at half the sampling rate, so the sampling rate would need to be faster than 3.3khz to allow room for the filter's roll-off. The sharper the filter, the lower the sampling rate can be.

Then, because the minimum separation between two tones is 73hz (between 697hz and 770hz), you would need at least a 128-point FFT. A 256-point FFT would be more discriminating, and may be necessary, depending on the sample rate. That would be about 1000 multiplications per 256-point FFT, plus the bit-reversed addressing and the trigonometry. The trig and bit-reversed addressing could be done with tables.

I don't know what a 'sliding window' is, but it could be some form of optimization that enabled the Z80 to pull this off. I have only used rectangular windows and Hanning windows. I would use a rectangular window in this situation, just to avoid additional multiplications.

The process might be:
  1. Gather 256 samples.
  2. Perform the FFT on the 256 samples.
  3. Check for peaks in the eight bins that correspond to the eight DTMF frequencies.
  4. Decode any peaks into the appropriate keys.
The algorithm could easily be expanded to detect the four busy-signal and dial-tone frequencies, but the number of samples may have to be increased to 512, as the 440hz and 480hz tones are only 40hz apart.
0 Kudos

563 Views
bigmac
Specialist III
Hello,
 
The reference quoted by Alban within the other thread (Silabs Application Notes) actually uses the Goertzel algorithm, rather than a full FFT.  This is somewhat less demanding, and much of the calculation can be done on the fly, after each sample is taken.  I am not sure whether this is what Rocco addressed in the previous post.  The reference gives the following basic requirements -
 
MCU speed:  25MIPS
Sampling rate:  8kHz
Block size:  200 samples
Frequency resolution:  40Hz
Sampling time:  25ms
 
The processing is still quite intensive,  and additional processing is required to reduce the effects of speech signals superimposed on the DTMF tones.
 
Regards,
Mac
 
0 Kudos

563 Views
celsoken
Contributor V
If your design is a low volume one, maybe you could consider using a DTMF IC like the ones offered by Zarlink (ex- Mitel) or Holtek.

You could save hours of software debugging on Goertel algos.

Cheers,

Celso
0 Kudos

563 Views
Alban
Senior Contributor II
Hi Mike, long time no see,

If there was a simple algo for small MCUs that would be ideal.
I don't think it is too difficult by using a TIMer and Input Capture.
After all, it is powerful enough to decode modulated signal from Infra Red remote controls.

http://forums.freescale.com/freescale/board/message?board.id=8BITCOMM&message.id=5677 is the thread already giving some resource on DTMF detection.

Alban.
0 Kudos