Digital Signal Processing Reference
In-Depth Information
file DTMF_BIOS_RTDX.EXE . Verify the corre-
sponding detected DTMF signals on the LEDs also displayed on the PC monitor,
as shown in Figure 10.3 b .
Run the application Visual C
++
Implementation Issues
1. A number is sent to the PC (through RTDX) every 50th time and can be changed.
2. The threshold value can be adjusted.
3. A “length” of 15 is set in the file numbersDlg.cpp. This is used to
analyze the last 15 numbers and determine if a button was pressed. A smaller
value can cause false detection due to noise, whereas it can be more difficult
to recognize a short DTMF signal with a larger value of length .
If the number 1 is pressed using a Dialpad, dozens of 1s are transmitted through
RTDX and appear in the data stream. With no button pressed, a stream of 0s
is transmitted. The algorithm distinguishes the actual buttons that are pressed.
An array of size length stores the last length numbers. The number of 1s in the
array goes into Weight1 , the number of 2s in the array goes into Weight2 , and so
on. If any of the weights is greater than 70% of length , then it is decided that the
number corresponding to that weight was pressed. The character corresponding to
this number is then added to the string shown in Figure 10.3 b . Note that each weight
should be followed by Weight0 (except Weight0 ).
10.1.3 Using FFT and Onboard LEDs for Verifying Detection
Figure 10.4 shows the core of the C source program that implements this mini-
project using an FFT scheme to detect the DTMF signals. Examples 6.5 and 6.6 and
Sections 10.4 and 10.5 illustrate the radix-4 FFT. The FFT is used to estimate the
weights associated with the seven frequencies. For example, the 697-Hz signal
corresponds to a weight of 697(256/8000)
22, and we would use the 22nd value
of the FFT array. A 256-point FFT is used with a sampling frequency of 8000 Hz.
Similarly, the 770-Hz signal corresponds to a weight of 770(256/8000)
25, and we
would use the 25th value of the FFT array, and so on for the other weights (28, 31,
39, 43, and 47). We then find the largest weights associated with the first four fre-
quencies to determine the row frequency signal and the largest weights associated
with the last three frequencies to determine the column frequency signal. For the
largest weights, the corresponding LEDs are turned on (as in Section 10.1.1). As
with the previous schemes, the same input (MATLAB, Dialpad, or microphone) can
be used. Verify similar results.
10.1.4 Using Goertzel Algorithm
Example H.6 (Appendix H) implements the DTMF detection on the C6416 DSK
using the Goertzel algorithm. The complete support files are included on the CD.
Transport this method to the C6713 DSK.
Search WWH ::




Custom Search