ECNG 3016 Advanced Digital Electronics: Eneral Nformation
ECNG 3016 Advanced Digital Electronics: Eneral Nformation
ECNG 3016
ADVANCED DIGITAL ELECTRONICS
http://myelearning.sta.uwi.edu/course/view.php?id=686
Semester II 2009
1.
GENERAL INFORMATION
Lab #:
Name of the Lab:
1
Design and Implementation of a DTMF Generator
Lab Weighting:
25%
Delivery mode:
Lecture
Online
; Lab
Other
Microprocessor Laboratory
Lab Dependencies2
Recommended
prior knowledge
and skills3:
Course Staff
Position/Role
Estimated total
study hours1:
Cathy Radix
Lecturer
E-mail
[email protected]
Azim Abdool
Instructor
10
Phone
Office
Office
Hours
x3157 Rm 321, Mon/Tue
Blk 1
11am 2pm
x2636 Rm 341/ Mon/
RTSG,
Thu
Blk 1
11am12pm
2.
Upon successful completion of the lab assignment, students will be able to:
1. Understand the concept of DTMF generation
2. Use Xilinx ISE to implement the DTMF generator using a given design
3. Use Multisim 7 to design and implement an analog circuit required to
combine dual tones
4. Analyze the scenario of DTMF generation with the feature of re-dial
3.
Cognitive
Level
C
Ap
Ap
C
PRE-LAB
Due Date:
Submission
Procedure:
Estimated time to
completion:
3.4.1 Introduction
Dual Tone Multi Frequency (DTMF) is a method of representing digits with tone frequencies, in
order to transmit them over an analog backbone communications network such as a telephone line.
During development, care was taken to make use of all frequencies within the voice band, in order
to reduce the demands placed on the transmission channel. In telephone networks, DTMF signals
are used to encode dial trains and other information. Although the method used until now to form
dial trains from a sequence of current pulses is still the standard in Germany, the transmission time
is too long and places an unnecessary loading on the network. In addition, many
2
Frequency
Low Group
1209 Hz
1336 Hz
1477 Hz
1633 Hz
697 Hz
770 Hz
852 Hz
941 Hz
With this system, the column is represented by a frequency from the upper frequency group (HiGroup: 1209-1633 Hz), and the line by a frequency from the lower frequency group (Lo- Group:
697-941 Hz). The tone frequencies have been chosen such that harmonics are avoided. No
frequency is the multiple of another, and in no case does the sum or difference of two frequencies
result in another DTMF frequency.
The deviation of the actual frequencies generated from the nominal frequency must be a maximum
of 1.8% during the dialing process. The envelope of the dial train must conform to the waveform
shown in Figure 1:
The nominal voltage level of the higher of the two frequencies must be at least 0.5 dB higher
(but no more than 3.5 dB higher) than the nominal voltage level of the lower of the two
nominal frequencies, in order to compensate for line losses with long lines.
In the frequency range of 250 Hz to 4600 Hz, the sum of the level of all frequencies which
do not form a dial train must be at least 23 dB below the sum of the level of the existing dial
train, and lie at least 20 dB below the level of the individual frequency of the dial train.
a
y (t ) = 0 + [a n cos(n 0 t ) + bn sin( n 0 t )]
2 n =1
a0/2 is the direct component of the signal. The partial component with the lowest angular frequency
(0) is termed the fundamental, and the others are known as overtones or harmonics. A recurrent
waveform which can be very easily generated with a microcontroller is the square wave, of which
the Fourier series is as follows:
The shares which the individual frequencies have in the total signal can best be seen from the
amplitude spectrum (see Figure 2):
When an analog filter is used to attenuate the direct and harmonic components sufficiently strongly,
a sinusoidal waveform with the same period as the square-wave will be obtained at the output.
The generation of the square-wave signals must meet the following requirements:
It must be able to generate two square-wave signals which are independent of each other.
In order to separate the signals, two output pins are needed, which provide the outputs of the
Hi-Group and the Lo-Group signals respectively.
It must be possible to set the specific duration of the transmission of the signals over a wide
range, of about 65 ms - 100 ms.
As already mentioned, in the frequency range of 200 Hz to 4600 Hz the level of the transmission
frequency must lie 20 dB above the level of all interfering signals. Since according to the
specification the signals from the High Group and Low Group must have different levels, an
individual filter is needed for each signal. The amplitudes and frequencies of all sinusoidal
waveforms can be derived from the Fourier series. When determining the cutoff frequencies in order
to design the analog filters, two requirements must be met:
Since it must be possible to combine every frequency from the High Group with every
frequency from the Low Group, the difference of level between the highest and the lowest
frequency of a group may only be 3 dB.
For the lowest frequency (f1) of a group, the suppression of the harmonic (3f1) must be at
least 20 dB. The maintaining of this limit value is most critical for the lowest frequency of a
group, since this frequency is furthest from the cutoff frequency of the filter.
The following equation applies for the square of the absolute value of Butterworth low-pass filters
of nth order:
This equation describes the behavior of the amplification of Butterworth low-pass filters as a
function of frequency. The parameters fg and n determine the cutoff frequency and order of the
filter.
The second requirement will already have been met if the ratio of the squares of the absolute values
of the frequencies f1 and 3f1 is 10/3, since the harmonic in a square-wave signal is already 1/3 lower
(see also Fourier series and Figure 2):
Calculations with both Hi-Group and Lo-Group frequencies result in a filter with an order of n=1.15.
A 2nd order filter, which can be constructed with an operational amplifier, would therefore suffice in
order to meet the required limit values. If a 3rd order filter is used, then only two more components
are required. In this way the sensitivity to tolerances can be reduced. Both requirements will be met
if the cutoff frequencies of the filter lie within the following limits:
Low Group fg > 880Hz fg < 1418Hz
High Group fg > 1527Hz fg < 2460Hz
If the cutoff frequency is at the lower limit, then the harmonics will be most effectively suppressed;
however, the difference of level between the highest and lowest frequencies will then be 3 dB. With
the highest possible cutoff frequency the difference of level is at a minimum, but harmonic
suppression will then be only 20 dB. When designing the filters, great care was taken to suppress
harmonics, and the difference of level within a frequency group was fixed at 2 dB. As a result of
this, the cutoff frequencies of the filters turned out to be 977 Hz and 1695 Hz. The suppression
which resulted is thus considerably better than required. The difference of level within a frequency
group is great enough to meet the required values, even if there is a shift of the cutoff frequency as a
10
DTMF Generator
Section 3.4.3 gave us the design process if we were using a microprocessor. It can also be used
here in our data path/ control unit approach. The overall block diagram of the DTMF generator is
shown in figure 5.
The functionalities of the different elements of the system are defined as follows:
1. The FIFO-type address generator takes the code of the key pressed and stores its address
according to the FIFO (first-in first-out) concept. This address is used by the ROM for the
tone values generation. The number the FIFO valid elements are incremented every time a
key is pressed and decremented once a tone is generated. For this laboratory exercise the
FIFO-type address generator is given.
2. The ROM module contains the predefined values of the high and low frequency signals to be
generated for a particular key. Its contents depend on the value of the clock signal used by
the programmable divider module.
3. The programmable divider module takes the two parameters needed for a tone and performs
two frequency divisions in order to generate Fh and Fl signals.
4. The control unit generates all the required control signals. It has two internal timers (tone
and pause). The signal dial_enable starts of the dialing process.
5. The two multilplexers are used for the selection of the appropriate inputs of the analog
module.
6. The frequency divider takes the reference frequency as input and produces two clock
frequencies: 2.096MHz and 1kHz clock signals required by the programmable frequency
divider unit, and the Tone and Pause timers respectively.
7. The Tone and Pause timers create the time standard period of times required fore the Tone
and pause parameters for DTMF generation. In this exercise we require a tone time of 85ms
and a pause time of 200ms. Tone and pause timers utilize a 1kHz clock signal meaning that
the Tone Timer must be a modulo 86, while the Pause Timer must be a modulo 201 counter.
When enabled by the control unit, the terminal count of each counter increments on every
11
12
13
14
Note: the FIFO Address Generator will be given for use in the laboratory exercise.
15
4.
IN-LAB
1 - 3.9k
2 - 39 k
1 - 120k
1 - 4.7k
1 - 47k
1 - 150k
2 - 2.2 nF
3 - 33nF
1 - 4.7 nF
3 - 100 nF
1 - 10 nF
Copper Wire
Pliers/Wire Clippers
VHDL Modules
FIFO address generator (given)
keypad encoder (from lab 1c)
5. Analyze and write the VHDL code of the Tone Timer required to create a ToneTime of
85ms. You are constrained here to utilizing a sequential behavioral approach. Perform
simulation at the functional and timing levels. [2 + 3 marks]
6. Analyze and write the VHDL code of the Pause Timer required to create a PauseTime
of 201ms. You are constrained here to utilizing a structural approach. Show your
decomposition diagram and the modules which you will be utilizing in order to build
the timer. Based on your decomposition, analyze the interconnection for hazards using
the Boolean logical expressions. Perform simulation at the functional and timing
levels. [2 + 3 marks]
7. Analyze and develop the VHDL code of the control unit according to the specification
of figure 4. Students are required to develop the state diagram for the control unit
before attempting this question. You are also required to develop the block diagram of
the particular state machine implementation. After developing the VHDL code for the
control unit, perform simulation at the functional and timing levels. [3 + 3 marks]
8. Finish the VHDL code of the DTMF generator by structurally assembling the modules.
Perform simulation at the functional and timing levels. [3 marks]
9. Integrate the keypad encoder to the design as shown in figure 7 above. Perform
simulation at the functional and timing levels. [3 marks]
10. Create an implementation constraints file (ucf) for the system. [1 mark]
11. Implement the circuit given in figure 3 and test it using two signal generators to mimic
the two square wave inputs. Document all results gained in this section. You can take
photographs of the oscilloscope screen as instruments for validation of your results. [2
marks]
12. Attach the analog modules to the system as shown in figure 8 below.
13. Download the digital component of the system to the Spartan 3 FPGA development
board.
14. Test your final system using an oscilloscope/spectrum analyzer/buzzer/speaker
module.
a. Test that the digital component of the system produces both dual tones using a
scope. A buzzer/speaker module which can give audible indications of the
tones present may assist in your debugging. [1 mark]
b. Test that the analog circuit of figure 3 converts the dual tones to a sinusoidal
waveform. Document all results obtained. [1 mark]
17
c. Integrate the digital and analog subsystems. Test that the system works as
specified and document all your results. [1 mark]
18
Design Port
clk
reset
dtmf_enable
dtmf_dial
Fh
Fl
keys(0)
keys(1)
keys(2)
keys(3)
keys(4)
keys(5)
keys(6)
keys(7)
keys(8)
keys(9)
keys(10)
keys(11)
T9
any available pushbutton
any available switch
any available switch
any available pin
any available pin
D11
R10
C12
T7
D12
R7
E11
N6
B16
M6
R3
C15
19
5.
POST-LAB
Deliverables:
Please organize your report in sections so that it is easy to read and assess.
1. Pre-lab Exercise [5 marks]
o Answer question asked in pre-lab exercise in the order given
o Students must show all working for calculations done.
2. In-lab Exercise [42 marks]
o Answer question asked in in-lab exercise in the order given
o Students must give a description of the design approach used for all
modules implemented.
o Students must separately describe how smaller modules were
integrated to form the complete system.
o Students must provide functional & timing simulation where
required/asked.
3. Design Assignment Exercise [3 marks]
20
Design Assignment:
Suggest and explain an approach that can be used to upgrade the DTMF generator implemented
in this lab to a DMTF generator with the feature of re-dial. This means that the last number
dialed can be re-dialed if requested (probably by the press of a pushbutton). Develop the
datapath block diagram for your approach for the DTMF generator with redial. Implement and
perform appropriate simulations to the designed system. [3 marks]
21