DTMF (Dual Tone Multi Frequency) is a technology used with touch tone phones, when a key is pressed a specific sound is made. These sounds/tone are transferred with the voice channel. It uses two frequencies to represent key pressed. These tones are called row and column frequencies as they correspond to the layout of a telephone keypad.
1) main.c
#include<reg51.h>
sbit led=P2^0;
sbit q1=P2^1;
sbit q2=P2^2;
sbit q3=P2^3;
sbit q4=P2^4;
void main()
{
led=1;
while(1){
if(q1==1 && q2==0 && q3==0 && q4==0) led=0;
else if(q1==0 && q2==1 && q3==0 && q4==0) led=1;
}
}
sbit led=P2^0;
sbit q1=P2^1;
sbit q2=P2^2;
sbit q3=P2^3;
sbit q4=P2^4;
void main()
{
led=1;
while(1){
if(q1==1 && q2==0 && q3==0 && q4==0) led=0;
else if(q1==0 && q2==1 && q3==0 && q4==0) led=1;
}
}
No comments:
Post a Comment