Sie sind auf Seite 1von 8

EE289 Lab LAB 3. Dual Tone Multi-frequency (DTMF) 1.

Introduction

Spring 2012

Dual-tone multi-frequency (DTMF) signaling is used for telecommunication signaling over analog telephone lines in the voice-frequency band between telephone handsets and other communications devices and the switching center. It is a method for instructing a telephone switching system of the telephone number to be dialed, or to issue commands to switching systems or related telephony equipment. The DTMF keypad is laid out in a 4!4 matrix, with each row representing a low frequency, and each column representing a high frequency. Pressing a single key (such as '1' ) will send a sinusoidal tone for each of the two frequencies (697 and 1209 hertz (Hz)). These two tones are added together and will be sent on the output. The multiple tones are the reason for calling the system multi-frequency. These tones are then decoded by the switching center to determine which key was pressed. Freq (hz) 697 770 852 941 1209 1 4 7 * 1336 2 5 8 0 1477 3 6 9 #

Table 1 DTMF keyboard layout

2.

Real Time Implementation on DSK6713


In this lab we implement the DTMF receiver on DSK6713. The DTMF signal will be generated in Matlab and sent to the DSK6713 via the computer sound card. The decoding process is done on DSK6713 and the detected dialed number will be sent back to the computer through the USB cable. This data transfer via USB is done using TI RTDX (Real Time Data Exchange). RTDX allows system developers to transfer data between target devices and a host without interfering with the target application. We use a GUI (Graphical User Interface) to generate and send the tones via sound card. It is also used to display the detected tones coming from DSK6713.

Figure 1 shows the interface between computer and the DSK6713.

PC Line In
Power Supply +5v

DSK6713

Speaker Out Sound Card

USB

Figure 1 DTMF hardware interface

3. The Procedure
Power-ON and board Initialization 1. Plug the power supply to the DSK. 2. Power up the DSK6713 board with the USB cable connected to the PC. 3. Go to desktop and double click on the CCStudio v3.3 shortcut to run Code Composer Studio for DSK6713. This takes few minutes to load. 4. On CCS connect to the DSK by going to Debug ! Connect. Once connected you will see a small green cable icon on the far bottom left of the CCS software which says Target is now connected.

Figure 1 Connecting to DSK

5. Connect a cable from the PC speaker output to the Line In input of DSK. Simulink Model and Build Process 6. Go to desktop and Run Matlab2009. Then go to http://www.cems.uvm.edu/~mirchand/classes/EE275/2009/Software/S hahin and save DTMFRealTime.mdl file in a local path on your PC and then open it in Matlab.

Figure 2 DTMF Simulink Model

7. On DTMFRealTime model go to Tools ! Real-Time Workshop ! Build Model. This would build the necessary files to be later used by CCS to program the DSK. This process might take several minutes in Matlab and CCS. You can follow the ongoing building process in Matlab and CCS command window. In Matlab Command window you will see that Matlab generates the necessary C codes from the Simulink model and then creates a project for CCS. Once Matlab created the project, CCS compiles the project and downloads the program onto the DSK board. When CCS finished with programming the DSK, it will notify Matlab and you will see in the Matlab command window the message !!!"#$%&'$()" #$&*. Also at the bottom of CCS window, you will see ++",-(.-/&0"-1*" 2$)*'++ message. This means that the program is running on the DSK.

Figure 3 Building DTMF Model

8. Create a folder inside C:\Documents and Settings\Your CEMS Username\My Documents\MATLAB\DTMFRealTime_ccslink and rename it to "DTMFRealTime_c6000_rtw". This path is where Matlab bulids the necessary files from the simulink model. 9. Copy the built output file DTMFRealTime.out (you will find it in C:\Documents and Settings\Your CEMS Username\My Documents\MATLAB\DTMFRealTime_ccslink) to the folder you just created. This file will be used by GUI and CCS to be downloaded onto the DSK6713. Graphical User Interface (GUI) and Data Transfer

The GUI program made in Matlab will be used to 1 Initialize the interface between PC and the DSK6713 2 Load the built Simulink model in CCS. 3 Receive a string of 11-digits from the user and generate and send the corresponding DTMF to the DSK. 10. Go to Matlab main window and set the Current Directory to C:\Documents and Settings\ Your CEMS Username \My Documents\MATLAB\DTMFRealTime_ccslink

Figure 4 Setting the Current Directory to Built files Path

10. go to http://www.cems.uvm.edu/~mirchand/classes/EE275/2009/Software/Shahin and save DTMF.m and DTMF.fig file in a local path on your PC and then open DTMF.m file in Matlab.

Figure 5 Running the GUI code

To Run the DTMF.m go to Debug ! Run or simply press F5. You will be asked by Matlab to add the path your DTMF.m file exists to your current path. Click on "Add to Path".

Figure 6 shows the GUI

Figure 6 DTMF GUI

By clicking on the keypad you can select the digits you want to be sent. Click on the Send button to transmit the selected digits to the DSK. Once sent, the received and decoded digits will be displayed on the top of GUI under the Detected Digits label.

Reference: Jacob Fainguelernt, Texas Instrument Inc. Matlab and Simulink.

Answer the following questions: Q1. If one presses 0267, what sinusoidal sequence will be generated for the DTMF? Q2. What is the transmitting speed? Q3. Does the speed change when the length of the string change? Q4. What improvements can possible be applied if there is a extremely long string to transmit?