DTMF FAQ - Telephone Tone Dialing chips

Contents:

[Document Version: 1.07] [Last Updated: 9/16/96]


1. About the Author

Author : T.H. Tsim
Version: 1.06
Date : August 25th, 1994
E-mail : tsjoit@solist.htsa.hva.nl

Please note that the author has moved to greener pastures and if you, by some miracle, manage to reach him at the above address, count yourself as blessed and buy a lottery ticket as SOON as possible. ;-)


  1.1) Contributors

Terry Lalonde, Dbsnow, Andrew R. Ghali, Brad Yearwood, Gary Schaum, John Fields, Neil Harrison, Arkady Horak-Systems


2. Why this FAQ exists

(From T.H. Tsim)

Hi! After reading sci.electronics for a couple of years, I've discovered that many people are interested in decoding DTMF-signals for various applications. A frequently asked question (FAQ) concerning this subject is: "What IC should I use in order to decode DTMF signals?"


3. Short introduction to DTMF

DTMF means: Dual Tone Multi-Frequency, There is no baseband multiplexing done on DTMF signals. The signal generated by a DTMF encoder is a direct algebraic summation, in real time, of the amplitudes of two sine (cosine) waves of different frequencies. i.e. pressing '1' will send a tone made by adding 1209 Hz and 697 Hz to the other end of the line.

(From the Editor)

Here's a more detailed explanation of what DTMF is:

Q: What frequencies do touch tones use for which numbers?

A: The touch tone system uses pairs of tones to represent the various keys. There is a "low tone" and a "high tone" associated with each button (0 through 9, plus * (star) and # (octothorpe or pound symbol). The low tones vary according to what horizontal row the tone button is in, while the high tones correspond to the vertical column of the tone button.

The tones and assignments are as follows:


          1     2     3     A  :  697 Hz

          4     5     6     B  :  770 Hz
                                           (low tones)
          7     8     9     C  :  852 Hz

          *     0     #     D  :  941 Hz
        ----  ----  ----  ----
        1209  1336  1477  1633 Hz
               (high tones)
or:

          1209 Hz 1336 Hz 1477 Hz 1633 Hz

                   ABC     DEF
697 Hz      1       2       3       A

           GHI     JKL     MNO
770 Hz      4       5       6       B

           PRS     TUV     WXY
852 Hz      7       8       9       C

                   oper
941 Hz      *       0       #       D
or:

    1  697+1209
    2  697+1336
    3  697+1477
    4  770+1209
    5  770+1336
    6  770+1477
    7  852+1209
    8  852+1336
    9  852+1477
    0  941+1336
    *  941+1209
    #  941+1477
    A  697+1633
    B  770+1633
    C  852+1633
    D  941+1633

When the 4 button is pressed, the 770 Hz and 1209 Hz tones are sent together. The telephone central office will then decode the number from this pair of tones.

The tone frequencies were designed to avoid harmonics and other problems that could arise when two tones are sent and received. Accurate transmission from the phone and accurate decoding on the telephone company end are important. They may sound rather musical when dialed (and representations of many popular tunes are possible), but they are not intended to be so.

The tones should all be +/- 1.5% of nominal. The high frequency tone should be at least as loud, and preferably louder than the low frequency. It may be as much as 4 db louder. This factor is referred to as "twist." If a Touchtone signal has +3db of twist, then the high frequency is 3 db louder than the low frequency. Negative twist is when the low frequency is louder.

Q: What are the A, B, C and D touch tone keys used for?
Why are they not found on touch tone phone sets?

A: These are extensions to the standard touch-tones (0-9, *, #) which originated with the U.S. military's Autovon phone network. The original names of these keys were FO (Flash Override), F (Flash), I (Immediate), and P (Priority) which represented priority levels that could establish a phone connection with varying degrees of immediacy, killing other conversations on the network if necessary with FO being the greatest priority, down to P being of lesser priority. The tones are more commonly referred to as the A, B, C and D tones respectively, and all use a 1633 Hz as their high tone.

Nowadays, these keys/tones are mainly used in special applications such as amateur radio repeaters for their signalling/control. Modems and touch tone circuits tend to include the A, B, C and D tones as well. These tones have not been used for general public service, and it would take years before these tones could be used in such things as customer information lines; such services would have to be compatible with the existing 12-button touch tone sets in any case.


4. Decoding DTMF

There are many ways to detect and decode these DTMF tones. One idea could be an eight sharp-tuned filter combination with detection circuits. Needless to say, this is very impractical, considering the various ICs (Integrated Circuits or 'chips') made by different manufacturers all over the world.

Most of these ICs do not require more than one (inexpensive) 3.58 MHz x-tal or resonator and the power circuitry. Usually the output is 4-bit binary + 1 strobe.


            --------------
           l              l- d3
           l     DTMF     l- d2
signal in -l    Decoder   l- d1     4-bit binary out
           l     chip     l- d0
           l              l- strobe
            --------------

Note: This figure is merely for decoration, it does not imply package information

Nice text to read about DTMF and telephony can be found in:

"Understanding Telephone Electronics"
Howard W.Sams & Co
ISBN: 0-672-27018-18


5. List of DTMF-receiver chips

The companies are listed in a random order:

Silicon Systems Inc.
E-Mail for Info: info@ssi1.com
WWW: http://www.ssi1.com
SSI202 DIP-18 [*]

SSI203 DIP-18
SSI204 DIP-14

Features of the SSI 75T201/2/3 Integrated DTMF receiver:

[*]: For those in the USA, see the addresses section for this chip.

We have a pinout for the SSI-202 from WDUNCKEL1:


Data 1  =|      |= Data 2
HEX/B   =|  S   |= DATA 4
ENABL   =|  S   |= DATA 8
IN1633  =|  I   |= CLRDATA VALID
VP      =|      |= DATA VALID
NC      =|  2   |= ATB   (CLOCK OUT)
GND     =|  0   |= X IN
X ENBL  =|  2   |= X OUT
ANALOGIN=|      |= GND

A 10 Meg resistor accross the colorburst crystal is neccessary. Pins 5,2,3,8 are tied high and 4,15,9,7,10 are tied to ground. Data output on d1-d8 will be valid when data valid goes high.

All req. 3.58 MHz (3.579545 MHz) crystal

(From John Fields)

Here's a bombshell for you: It doesn't have to be a color burst crystal! As long as the encoder and the decoder are working on the same clock freq, and the freq isn't too high, (or maybe too low) the decoder will decode the tone pair sent by the encoder.

[back to the original FAQ]

A neat and well documented design + PCB layout by Tom Miller KA1JQW, can be found in "The ARRL handbook for radio amateurs", ISBN: 0-87259-169-7

Chrystal Semiconductor Corp.
CS20x family

OKI
MSM6843 DIP-28, 3.58, 4b1s

Application note in OKI Telecom LSI data book

Motorola
MC145436
MC68HC05F5

(From Arkady Horak-Systems)

I spent about the last 14 months of my life working on an integrated DTMF receiver here at Motolora and I would like to have you add the part to the DTMF-list. The receiver is part of a 6805 8-bit microcontroller and is called the MC68HC05F5. Here is a quick feature list:

Being an avid electronics hobbyist I feel this part will see a lot of service in hobby applications. This part is, to the best of my knowledge the first general purpose microcontroller with an integrated DTMF receiver. Currently only a ROM based version is available but as sales grow a 705 or EPROM version may be manufactured. Also, this part is compatible with the 6805 development tools and software.

Arkady Horak <ark@oakhill-csic.sps.mot.com>
Motorola CSIC Microcontroller Division
Austin, TX

Teltone
M957-0x DIP-22 or SOIC-24, 4b1s, 5 and or 12 Volt (read below)

CAUTION: M957-02 and M957-01 differ in operating voltage!, M957-01 can operate from 5 - 12V, M957-02 operates 5V only (not suitable for 12 V apps!)

A ready to build schematic by R.G. Krijgsman based on this Teltone M957-2 chip can be found in: "Het Elektuur telefoonboek" ISBN 90-70160-94-3, (Dutch language)

Unknown
KT3170 DIP-18, minimal ext. parts ?

UMC, United Microelectronics Corp.
UM9203 DIP-18 4b1s and 2of8
UM9204 DIP-14
UM92870A/B/C DIP-18 (three variants)

Examples of line-interfaces and app-notes in the UMC communications ICs databook.

Mitel Corp
MV8870 [*]

You can get application notes (in PostScript) from the Mitel WEB server: http://www.semicon.mitel.com/prod_sum_dtmf.html or FTP site: ftp://ftp.semicon.mitel.com/pub.10may95/ic/dtmf

[*]: For those in the USA, see the addresses section for this chip.

Note:

  1. Mitel has an Application Note - MSAN-108, titled "Applications of the MT8870 integrated DTMF receiver" in their Digital/Analog Comunications Handbook ISSUE 9. From my experience this app. note is valid for all Mitel tone recs.
  2. Teltone seem to carry this type-number as well.

Toshiba
TC35301AP DIP-28, 4b1s

You can get Application Notes (http://rel.semi.harris.com:80/docs/datasheets/Linear_Integrated_Circuits/Section_08/index.html) on the following chips from WWW. They are in PostScript so be ready to print or download them.

Harris
http://www.semi.harris.com
CD22202 DIP-18, 4b1s
CD22203 DIP-18 4b1s and 2of8
CD22204 DIP-14 or SOIC-24, 4b1s

Legend:


6. An alternative approach: DSP

Another way to decode/produce DTMF signals is by applying a DSP, a Digital Signal Processor. Practical examples of such an approach can be found in the TMS320 BBS, which is currently being mirrored at ftp://ftp.ti.com/mrrors/tms320bbs/. You may also wish to see the whole index ftp://ftp.ti.com/mirrors/tms320bbs/00readme

Files of interest concerning this faq are:

TEL-2-1.EXE
57K | DTMF Encoder/Decoder for C3x by DSP
TEL-2-2.EXE
53K | DTMF Detection Data Sheet by Ensigma Ltd.
DTMF10.EXE
24K | TMS320C10 based DTMF decoder
DTMF10E.EXE
19K | TMS320C10 based DTMF encoder
DTMF_C17.EXE
126K | TMS320C17 based DTMF encoder/decoder

Texas Instruments (http://www.ti.com) has expanded their WWW presense. They have an excellent search function that will search their whole site for any keywords. You will find it at URL: http://www.ti.com/corp/docs/search.htm.

For example, try searching for "BBS" and you will find the very useful TMS320 Hotline FAQ at http://www.ti.com/sc/docs/dsps/develop/hotfaq2.htm. If you search for "DTMF" you will find a bunch more useful things about DTMF and chips, etc. Way to go, TI!


7. If you live in USA read this section !

(From the Editor)

If you are designing a device that will attach to the phone line and you are situates in USA, you will need to make the FCC happy. You can either do this by submitting your completed circuit to them for compliance testing (which can run a few thou$and) or you can purchase a small device that is preapproved by the FCC. It is called DAA for Data Access Arrangement. It is a small, usually potted, module that isolates (literally) your circuit from the phone line.

The FCC section you are trying to satisfy is part 68. You should visit your local library and read up on it whether your get the preapproved part or try to have the FCC [affiliated lab] do the testing .. or just plain hope you don't get caught. It's pretty dry reading but that's life.

There are several different modules on the market that fit into this category. They are:


  7.1) Can I build my own DAA?

(From Dieter Christensen)

Telephone hybrids are a real pain in the butt to design. Don't waste your time. Buy one. They're not expensive.

Ok, ok. If you're curious, the reason they're so difficult is that they have to be optimally balanced in such a way that they will work on almost any phone line they are hooked up to. A hybrid's function is to transmit a signal over the phone line at the same time that it is receiving the signal from the other end. Ideally, the received signal will have none of the transmitted signal on it (because otherwise you would hear yourself EXTREMELY loudly whenever you talk into a telephone handset, for instance). The degree to which a hybrid's receiver can cancel out the transmitted signal is called 'rejection' and is usually expressed in db. It depends strongly on the complex impedance of the phone line, and unfortunately each phone line has a different impedance. To design a hybrid with good rejection you gotta twiddle a lot with different caps and resistors and all that, and it can be hairy if you want a design that will work with more than one phone line without having to be adjusted. Ma Bell publishes specs on what the distribution of phone-line impedances is and all that, and you'd try to make your circuit nail the median impedance. Of course, in your application it seems like you're only dealing with one phone line, which makes things a little, but not much, easier.

In addition, your DAA has to be able to deal with all the nasty spikes and so on that come down the line, and that isn't much fun to design, either. And the output levels have to be within Ma Bell's specs, and so on.

But, Anyway, the good news is that the ideal solution is quite simple.

You can purchase a complete DAA and hybrid, which comes on a little thick-film module all pre-engineered and calibrated and adjusted, for less than $20. You just hook up the phone line to two of the pins (you DO need a switch to take it on and off hook) and connect your headphone amplifier and microphone amplifier and dialer (or whatever you are using for your studio) to two other pins. Simple.

You get at least 6db rejection, and typically 12 to 16 db. And you don't have to worry.


8. I'm interested in MODEMs, know any FAQs?

(From the Editor)

Why, yes. Here are two MODEM articles that I have on-line. If you know of any other STABLE articles elsewhere, feel free to [drop me a line]

(yeah, yeah, I know, not very descriptive file names ;-)


9. Addresses


10. Conclusion/About the Author

Well, that's the latest I've found on DTMF receivers. There are no doubt other companies producing these kind of chips, so please let me know and I'll improve this list (when I've got the time)

Unfortunately, I'm not that experienced yet to answer any difficult technical questions about this subject.

For suggestions, improvements, info, flames, waterbuckets (?) please e-mail me at: tsjoit@solist.htsa.hva.nl.

I graduated July 1st 1994, so I won't continue writing updates for this faq (no time, no space, no money :)

I like to thank all of you who think this faq was usefull, especially the ones who wrote me e-mail . I was very suprised to see this faq appear in the most strange places on the Net :)

Anyway...have fun with those di-du-dit-di-duh tones :)


11. DTMF in C (on a PC) by Kirk Hobart


#include <stdio.h>
#include <ctype.h>
#include <math.h>
#include <conio.h>
 
#define BITS 0xFF00
#define NOISE 0         /* enable noise shaper */
#define TON  0.100      /* tone duration */
#define TOFF 0.100      /* silence duration */
#define RAMP 0.002      /* tone rise and fall time */
#define RATE 11025.0    /* sample rate */
#define numberof(n) (sizeof(n)/sizeof(*n))
 
struct
{
  char letter;
  double f1, f2;
} button[] =
{
  {'1', 697, 1209},
  {'2', 697, 1336},
  {'3', 697, 1477},
  {'A', 697, 1633},
  {'4', 770, 1209},
  {'5', 770, 1336},
  {'6', 770, 1477},
  {'B', 770, 1633},
  {'7', 852, 1209},
  {'8', 852, 1336},
  {'9', 852, 1477},
  {'C', 852, 1633},
  {'*', 941, 1209},
  {'0', 941, 1336},
  {'#', 941, 1477},
  {'D', 941, 1633},
  {'X',  20,   20},
  {'Y', 100,  100},
  {'Z', 500,  500},
};
 
int main(void)
{
  double t, v=0;
  char c;
  int value=0, n;
  FILE *fout;
 
  puts("Press 123A456B789C*0#D to digitize DTMF-tones to file. Fs=11025. ESC quits.");
  fout = fopen("x", "wb");
  while (1)
  {
    c = toupper(getch());
    if (c == 0x1B)
      break;
    for (n=0; n<numberof(button); n++)
    {
      if (c==button[n].letter)
      {
        putchar(c);
        for (t=0.0; t<TON; t+=1/RATE)
        {
          v = sin(2*M_PI*button[n].f1*t) + sin(2*M_PI*button[n].f2*t);
          if (t<RAMP)          /* See Note Below */
            v *= t/RAMP;       /* See Note Below */
          if (t>TON-RAMP)      /* See Note Below */
            v *= (TON-t)/RAMP; /* See Note Below */
          #if NOISE
            value = floor(v*(BITS/4)+BITS/2) + (value&~BITS);
          #else
            value = floor(v*16383+32768.5);
          #endif
          fputc((value&BITS)>>8, fout);
        }
        for (t=0.0; t<TOFF; t+=1/RATE)
          fputc(0x80, fout);
      }
    }
  }
  putchar('\n');
  fclose(fout);
  return 0;
}

Note: This provides simple envelope modulation. It ramps the amplitude up and down linearly to avoid the little pops you would otherwise hear when the sound starts and stops. DTMF encoder chips usually don't bother doing this.

Do you understand the noise shaper? It's a more advanced concept. The effect is subtle, and it's not required for DTMF use. It was just a fun experiment :-)


Please check attribution section for Author of this document! This article was written by filipg@repairfaq.org [mailto]. The most recent version is available on the WWW server http://www.repairfaq.org/filipg/ [Copyright] [Disclaimer]