EECS20: Introduction to Real-Time Digital Systems
Lab11: DTMF Decoding
EECS20: Introduction to Real-Time Digital Systems
©1996 Regents of the University of California.
By K. H. Chiang, William T. Huang, Brian L. Evans.
URL: http://www-inst.eecs.berkeley.edu/~ee20
News: ucb.class.ee20
Dual tone, multi-frequency (DTMF) is the standard used in encoding digits for transmission between the customer and the centeral office. If you open up your phone (something for which you could be fined heavily back in the good old days), you'll see a four row, three column matrix switch. Each row has a unique frequency assigned to it and likewise for each column, so each button has a unique two frequency combination.
When you press a button, the telephone determines the row and column of that button and generates two tones at the two frequencies associated with that button. At the central office, the telephone switch decodes those tones.
Decoding can be accomplished by using a bank of eight bandpass filters, one for each of the eight possible tones. If two of these tones are detected, it is assumed that the key associated with both of these tones was pressed. The design of these bandpass filters is greatly eased by the use of the frequency domain and the Fourier transform.
Hey! How come the telephone has a 4x3 matrix switch, but the table above is 4x4? Well, originally there were functions assigned to the lettered buttons, but the digits were deemed sufficient. The military does use those four buttons though (flash, priority, override, and something else that i can't remember right now), so that the general can order his caviar while the poor sod in the trench eats some more shells.
>> sound(dtmf(31937),fs)should dial the lab phone number [feel free to annoy your friends and relatives by calling them up with your generated DTMF sequences; sorry, local calls only]. Use . To ensure that your sequences will actually dial the lab phone, make sure that each tone is at least 40 ms in length, and the pause between tones is at least 40 ms.
C:\TEMP
directory on the lab machines. Use:
>> load mystery -asciito load the mystery sequence named
mystery
into Matlab.