DTMF
Receiver DSP C Code
Description:
detects digits dialled by standard Dual Tone Multi-Frequency (DTMF) telephones.
With DTMF, the 16 possible digits are each signified by pairs of tones,
one from a "low" group - 697Hz, 770Hz, 852Hz, 941Hz - and the
other from a "high" group - 1209Hz, 1336Hz, 1477Hz, 1633Hz.
Requirements on a DTMF receiver design
are conflicting. Detection parameters - tone absolute and relative (twist)
levels, tone frequencies, digit-on and -off timings - have specified tolerance
ranges, either side of which the DTMF receiver must definitely register
or not register the digit conditions. There may be interference from noise
or dial-tone. False digits must not be simulated by speech. Administration
specifications differ. This DTMF receiver combines highly selective digit
detection with very efficient DSP resource use.
The C code is suitable for any processor
with an ANSI-compliant C compiler. It is designed especially for efficient
operation on low-cost fixed-point DSP- and general-purpose micro-processors.
All data memory is specified as 16-bit integer words. Multiplies are integer
16x16-bit with 32-bit products.
The software is in the form of 4 callable
subroutines: two are for initialising per-channel memory & loading
default parameters, one is for accessing any newly detected digit, and
the main one is for per-sample processing. To suit applications, some
digit detection parameters are made user-programmable. Operation can be
at 8.0kHz or 9.6kHz sample rates. A user's guide is supplied and full
test results are available.
Specification:
the conditions under which DTMF digit states are registered either a new
digit when in the "pause" state or else a pause(non-digit) when
in the "digit" state are as follows. The symbols Pt/f/r and
* signify that the parameter is user-programmable. All levels are per
DTMF tone.
Parameter: |
Digit
detected |
Digit
NOT detd. |
Notes |
Frequency
offset: |
<= 2% |
>=
3% |
|
Signal
level threshold*: |
>= Pt (Pt >= -45dBm) |
< Pt & >= 0dBm |
Clipping
@ -3dBm/tone |
Forward
Twist*: |
<= Pf (Pf <= 10dB) |
>
Pf |
|
Reverse
Twist*: |
<= Pr (Pr <= 10dB) |
>
Pr |
|
Signal
duration: |
>=
40ms |
<=
20ms |
|
Inter-digit
pause*: |
>=
40(30)ms |
<=
20(10)ms |
ie
40<>20ms (OR 30<>10ms) |
False
detection in speech: |
<
1.0 digits (avg.) |
|
using
Mitel CM7291 CD |
Noise
interference: |
1000/1000
digits |
|
+12dB Signal-Noise-Ratio |
Dialtone
interference: |
1000/1000
digits |
|
-12dB Signal-Dialtone-Ratio |
The
code meets all known specifications eg ITU Q.24 Table A-1 and the Mitel
CM7291 data sheet.
Processor
Load:
MIPS# |
Data
memory (words) |
Prog
memory (bytes)# |
1.3 |
4(common)+27(/channel) |
1.4k |
-
#example figures from compiling for the TI TMS320C5000(C55x) DSP processor
at 8.0kHz sampling
Digit analysis option: this function
can be added to the basic DTMF receiver. On each digit detected, reported
are: the digit-on and -off times to 2ms accuracy, the per-tone levels
to 0.5dBm accuracies, and the per-tone frequencies to 1.5Hz accuracies.
Availability:
NOW - sale is under licence - integration support offered
|
|