This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Verifying DTMF Algorithms

Hello

My goal is to create an application that recognises DTMF signals using
a ARM7 uC (I have LPC2368).
After looking over background theory (DFT) and after studying several
code examples for different microcontrollers (msp, arm, pic...) I found
an example made for LPC2138. I succesfully ported it to my board, but
it doesn't work as expected.
The program - as I understand - should work in a following way: DTMF signal should be
connected on ADC and after a valid done is sent to ADC, correct number
should appear in ie. Hyperterminal.
The problem is:
When I connect everything as it should be - and generate a DTMF signal
trough my sound card using appropriate software which generated DTMF
signals - i don't get correct results on ie. Hyperterminal. Furthermore
the recognition doesn't work at all with standard DTMF tones however it
partialy works with Knox (modified DTMF) frequencies. With Knox I get a
respons in Hyperterminal, however the response is never correct - and
for some DTMF buttons there is no response at all.
For example when I press "1", I get "5" in Hyperterminal; when I
press "2", I get "B" in Hyperterminal; when I press "4", I get "8" in
Hyperterminal; and so on. When I press *,#,A,B,C,D I get no response at
all.

Here is the link for the example I am talking about:
http://www.keil.com/download/docs/325.asp

Does anyone have an advice what could be wrong?
It seems very strange that the for example program recognises "1" as "5" always, not just sometimes...just like the frequencies in a DEFINE part if dtmf.c are mixed up - but as far as I checked they are not.

Parents
  • Are you running the processor at the correct speed?

    If your ADC samples at the wrong frequency, the detection frequencies will be wrong. In your case it seems like the algorithm tries to detect the wrong frequencies.

    The PLC in the processor is quite flexible, but it must be configured according to the crystal you are using.

Reply
  • Are you running the processor at the correct speed?

    If your ADC samples at the wrong frequency, the detection frequencies will be wrong. In your case it seems like the algorithm tries to detect the wrong frequencies.

    The PLC in the processor is quite flexible, but it must be configured according to the crystal you are using.

Children
  • I agree with you - I also tried to change this settings at first - but everything I changed did not bring any result.
    I double checked the settings again. My quartz iz 12Mhz, I do not use any devider at all and I sample with (I belive) 3Mhz -> AD0CR = 0x00200400; /* Setup A/D: 10-bit AIN0 @ 3MHz */

    I looks like the #define values in dtmf.c section are wrong - but I am sure that thay are not:) I think it must be some stupid error - because algorithm works every time with certain frequencies and never with others.
    I also tried several different programs that generate DTMF tones - but no useful results.

    Did anyone get this example working in "real life"?