MT8870 DTMF Decoder Interfacing with MSP-EXP430G2 TI Launchpad

Overview of DTMF

MT8870 DTMF Decoder Module
MT8870 DTMF Decoder Module

 

DTMF (Dual Tone Multi-Frequency) is a telecommunication signaling technique that uses a mixture of two pure tones (pure sine waves). It is used in phones to generate dial tones.

MT8870 is a DTMF decoder; it helps decode the key pressed.

It gives a 4-bit digital output that can be processed to identify the key pressed. This gives 16 possible outputs for 16 different keys.

For more information about the MT8870 DTMF decoder and how to use it, refer to the topic MT8870 DTMF Decoder in the sensors and modules section.

 

Connection Diagram of DTMF MT8870 with MSP-EXP430G2 TI Launchpad

Interfacing MT8870 DTMF Decoder Module with MSP-EXP430G2 TI Launchpad
Interfacing MT8870 DTMF Decoder Module with MSP-EXP430G2 TI Launchpad

 

Dial Tone Identification using DTMF MT8870 and MSP-EXP430G2 TI Launchpad

Decoding dial tones received from mobile phone and displaying them on the serial monitor of MSP-EXP430G2 TI Launchpad.

 

Here, a mobile phone is connected to the MT8870 DTMF Decoder module through an auxiliary cable.

The four digital signals from the module are connected to the MSP-EXP430G2 TI Launchpad board along with the StD (Delayed Steering Output) signal.

StD is used to detect the key press. It goes High when the key is pressed and then returns to Low again.

 

Tread Carefully: MSP-EXP430G2 TI Launchpad board has a RAM of 512 bytes which is easily filled, especially while using different libraries. There are times when you need the Serial buffer to be large enough to contain the data you want and you will have to modify the buffer size for the Serial library. While doing such things, we must ensure that the code does not utilize more than 70% RAM. This could lead to the code working in an erratic manner, working well at times, and failing miserably at others. 

There are times when the RAM usage may exceed 70% and the codes will work absolutely fine, and times when the code will not work even when the RAM usage is 65%. 

In such cases, a bit of trial and error with the buffer size and/or variables may be necessary.

 

Dial Tone Identification DTMF MT8870 Code for MSP-EXP430G2 TI Launchpad

void setup() {
  Serial.begin(9600);
  pinMode(11, INPUT);
  pinMode(12, INPUT);
  pinMode(13, INPUT);
  pinMode(14, INPUT);
  pinMode(15, INPUT);
}

void loop() {
  uint8_t number;
  bool signal ;  
  signal = digitalRead(11);
  if(signal == HIGH)	/* If new pin pressed */
   {
    delay(250);
    number = ( 0x00 | (digitalRead(15)<<0) | (digitalRead(14)<<1) | (digitalRead(13)<<2) | (digitalRead(12)<<3) );
      switch (number)
      {
        case 0x01:
        Serial.println("Pin Pressed : 1");
        break;
        case 0x02:
        Serial.println("Pin Pressed : 2");
        break;
        case 0x03:
        Serial.println("Pin Pressed : 3");
        break;
        case 0x04:
        Serial.println("Pin Pressed : 4");
        break;
        case 0x05:
        Serial.println("Pin Pressed : 5");
        break;
        case 0x06:
        Serial.println("Pin Pressed : 6");
        break;
        case 7:
        Serial.println("Pin Pressed : 7");
        break;
        case 0x08:
        Serial.println("Pin Pressed : 8");
        break;
        case 0x09:
        Serial.println("Pin Pressed : 9");
        break;
        case 0x0A:
        Serial.println("Pin Pressed : 0");
        break;
        case 0x0B:
        Serial.println("Pin Pressed : *");
        break;
        case 0x0C:
        Serial.println("Pin Pressed : #");
        break;    
      }
  }
}

 

Video of DTMF Dial Tone Identification using MSP-EXP430G2 TI Launchpad


Components Used

TI Launchpad MSP-EXP430G2
TI Launchpad MSP-EXP430G2
1
MT8870 DTMF Decoder
MT8870 is a DTMF (Dual Tone Multi-Frequency) receiver, which decodes the dial tone generated from telephone keypad. It is used in interactive voice response systems (IVRS), Remote control, Credit card systems etc.
1

Downloads

MT8870_DTMF_Decoder_Interfacing_With_TI_Launchpad_INO Download
Ad