DTMF_8870

DTMF 8870 or 9170 decoder Library

This library reads the signals of the DTMF 8870 or 9170 chip. If data is available one can read it raw (HEX) or as text (Keypad map).  Dual Tone Multiple Frequency technologies were introduced by Bell Labs to replace pulse-dialing in telephones. DTMF 8870 or 9170 is a DTMF Decoder IC that generates a 4-bit digital code with respect to the DTMF audio signal. And STD: or STQ: pin of IC It gets high when a tone-pair is received. It gets low automatically after the latch is updated. In this  library  very easy to decode telecommunication signaling over telephone line (DTMF). 

How to define pins for DTMF_8870 or 9170 in MikroStudio
#define DTMF_Q1  A,0 // 8870 OR 9170 OUTPUT Q1 @ PORTA,0
#define DTMF_Q2  A,1 // 8870 OR 9170 OUTPUT Q2 @ PORTA,1
#define DTMF_Q3  A,2 // 8870 OR 9170 OUTPUT Q3 @ PORTA,2
#define DTMF_Q4  A,3 // 8870 OR 9170 OUTPUT Q4 @ PORTA,3
#define DTMF_STQ A,4 // 8870 OR 9170 OUTPUT INDICATION STQ  @ PORTA,4
Following functions can be used by this library.
void Dtmf8870_Init();               // for initializing from HW_INI()
bool Dtmf8870_Available();          // if new DTMF code incoming then indicate
char Dtmf8870_Read_Raw_Available(); // if new DTMF code incoming then return hex data of DTMF code 
char Dtmf8870_Read();               // read new DTMF code return in keypad map data like 'D1234567890*#ABC' 
char Dtmf8870_Read_LastRaw();       // read last DTMF decoded return hex data of last DTMF code

 

Admin
Author: Admin

This Post Has 2 Comments

  1. Alexandr

    hi, thanks for this library. I was already trying to decode DTMF with pic microcontroller But in my case the code gets stuck until a new DTMF arrives. It is easy in Arduino but for other microcontroller it is a bit difficult to make so i came here searching google and i read your article, Thanks again I have tried this library for PIC and STM microcontrollers and i am happy to report that it was successful.

  2. 就爱要

    Where there is a will, there is a way.

Leave a Reply