In the Lab 4 you wrote a program to generate DTMF (Dual Tone Multiple Frequency) tones using the 56002. In the next few labs you will build a decoder to indicate which DTMF tone is being generated. This can be accomplished in many ways. The way we will do it in this lab is to build a bandpass filter and detector for each of the eight DTMF frequencies. Thus, if the number ``8'' is pressed the outputs of the 853 Hz and 1336 Hz detectors should go high, while the outputs of the other detectors should remain low. In Part 1 of Lab 6 you will design the bandpass filter and detector for the 770 Hz frequency. In the next part you will add the filters and detectors for the other frequencies to be able to detect all eight frequencies.
This lab will deal with telephone-line frequencies. A telephone line has a low-pass cutoff of about 3 kHz. Thus, we can get all the information about any signal on a telephone line by sampling the signal at any frequency above 6 kHz. For this lab we will use a sampling frequency of 8 kHz, which will make filter design easier than if we sampled at 48 kHz.
We will design the bandpass filter by placement of poles and zeros. For example, suppose we want to detect a frequency of 770 Hz. We want a bandpass filter which will pass 770 Hz (and a few hertz above and below 770), while blocking low and high frequencies. We could do this by placing a pole just inside the unit circle from 770 Hz, and zeros at 0 Hz and 4,000 Hz. (See Section 4.5.3 of the text.) It turns out that this two-pole filter will not give a suitably narrow bandpass response. However a four-pole filter, with poles just inside the unit circle at about 765 Hz and 775 Hz will give a suitable bandpass filter. Figure 1 below shows the pole-zero placement for a four-pole bandpass filter. Figure 2 shows the frequency response of this filter. Figure 3 shows the response of the filter to an in-band 770 Hz signal and an out-of-band 693 Hz signal.
To design your bandpass filter put poles just inside the unit circle at frequencies of about 765 Hz and 775 Hz. Adjust the radius of the poles until the gains at 693 Hz and 852 Hz (the signals the bandpass filter should stop) are less the 5% of the maximum gain at about 770 Hz.
The detector for 770 Hz is simple to design. One method is to just square the output signal from the output of the bandpass filter and average it over one period. Then if the output of the detector exceeds some threshold value you can set a pin high to indicate that that particular frequency is present in the input signal. Figure 4 shows the response of such a detector to a 770 Hz pulse.
You also need an external indication of when the 770 Hz signal is present, to see if your program is working correctly. To do this you must toggle an external pin on the 56002. Like the 68HC11, the 56002 has several dual-purpose pins - pins which can be used for a specific purpose (like serial I/O), or can be used for general purpose I/O if not being used for their specific purpose. The 56002 has 15 pins devoted to Port B, the the Host Interface (HI) port. When used as a host interface, the 56002 can communicate with a host computer over an eight-bit parallel bus. When not used as a host interface, the 15 pins of Port B can be used for general purpose I/O. Section 5.2 of DSP56002: Digital Signal Processor User's Manual describes how to set up Port B for use for general purpose I/O. Read this section of the manual.
In this lab you will design and implement a bandpass filter for one of the DTMF frequencies. In subsequent labs you will add a detector for that frequency, then add filters and detectors for the other seven frequencies.