From MATLAB® and Simulink® to
Real Time with TI DSPs
Dual Tone Multi Frequency
(DTMF)
Content developed in partnership with
Tel-Aviv University
© 2007 Texas Instruments Inc,
0-1
DTMF Signals
• The DTMF is a popular signaling method between
telephones and switching centers
• DTMF is also used for signaling between the
Telephone network and computer networks
• The DTMF signals are Transmitted over a telephone
line
• Uses speech frequency signals
• DTMF signals are the superposition of 2 sine waves
with different frequencies
© 2007 Texas Instruments Inc, Slide 2
The DTMF Keypad
1209 Hz 1336 Hz 1477 Hz
697 Hz 1 2 3
770 Hz 4 5 6
852 Hz 7 8 9
941 Hz * 0 #
© 2007 Texas Instruments Inc, Slide 3
DTMF Digits
© 2007 Texas Instruments Inc, Slide 4
DTMF Generation
697 Hz
Row 770 Hz
Selector
852 Hz
Desired 941 Hz
Digit
+ Dual
Tone
1209 Hz
Column
Selector 1336 Hz
1477 Hz
© 2007 Texas Instruments Inc, Slide 5
DTMF Detection
Leading
Edge
Detection
Enable
Frequency Convert
x[n] Detection to Display
Display
© 2007 Texas Instruments Inc, Slide 6
Frequency Detection
Row
Calculation
697 Hz
770 Hz
852 Hz
941 Hz Digit
Calculated
Digit
x[n] Column
Calculation
Calculation
1209 Hz
1336 Hz
1477 Hz
© 2007 Texas Instruments Inc, Slide 7
Simulation (cont.)
Selecting Digits for transmission
© 2007 Texas Instruments Inc, Slide 8
Simulation (cont.)
Detected Digits
© 2007 Texas Instruments Inc, Slide 9
Simulation (cont.)
• The Receiver Performs:
Signal
sensing Edge Detected
Rcv
samples
Buffer Detect
New Digit
Digit Digit
© 2007 Texas Instruments Inc, Slide 10
Simulation (cont.)
• Digit Detection: transforms signal received to digit
using the following detection blocks:
X1 … XN
852 Hz
Detect
941 Hz
Detect
1209 Hz
Detect
Detect 1 2 3
697 Hz
Detect
770 Hz
4 5 6
X1 … XN
Detect 7 8 9
852 Hz
Detect * 0 #
941 Hz
© 2007 Texas Instruments Inc, Slide 11
Simulation (cont.)
• Detection block operation:
– Input: X1…XN signal samples
– Output: flag to indicate whether the signal has a correlation with
the frequency under detection or not
– Implementation:
» Band Pass around the frequency under detection
» Average the absolute value of the BPF output
» Comparing the average to an agreed threshold
» Flag is up the average is greater than the threshold
=
N
Detect BPF 1 Threshold
fb
X1…XN
(fb-eps , fb+eps) N
k 1 Test
flag
© 2007 Texas Instruments Inc, Slide 12
Real-Time Environment
• Based on the Simulation model
• R-T Implementation involves detecting the digits
only
• The R-T Simulation involves a few modification to
support the interface with the transmitter
© 2007 Texas Instruments Inc, Slide 13
Real-Time Environment (cont.)
PC MATLAB:
DTMF transmission
GUI
PC
(Sound Card)
rtdx Detected Digits
DTMF
Line In
A/D DTMF Receiver
x t
TMS320C6713
DSK6713
© 2007 Texas Instruments Inc, Slide 14
Real Time Environment (cont.)
• The DTMF signal is processed in order to overcome
DC offset and to make amplitude modifications:
© 2007 Texas Instruments Inc, Slide 15
GUI Functionality
• Load the DSK
• Initialize RTDX
• Create DTMF samples
• Transmit them to PC Sound
Card
• Display Dialed and Dtected
Digits for comparison
© 2007 Texas Instruments Inc, Slide 16
The System
Transmitted
Digit GUI
Sound Card
USB
Reported Digit
)RTDX(
© 2007 Texas Instruments Inc, Slide 17