What Is DTMF?: DTMF Is A Signalling System For Identifying The Keys or Better Say
What Is DTMF?: DTMF Is A Signalling System For Identifying The Keys or Better Say
#define s1 portb.f0
#define s2 portb.f1
#define s3 portb.f2
#define s4 portb.f3
void main()
{
trisb = 0xff;
trisc = 0x00;
while(1)
{
if(s1==0&&s2==1&&s3==0&&s4==0)
{
portc.f4 = 1;
portc.f5 = 0;
portc.f6 = 1;
portc.f7 = 0;
}
else if(s1==0&&s2==0&&s3==0&&s4==1)
{
portc.f4 = 0;
portc.f5 = 1;
portc.f6 = 0;
portc.f7 = 1;
}
else if(s1==0&&s2==1&&s3==1&&s4==0)
{
portc.f4 = 0;
portc.f5 = 1;
portc.f6 = 1;
portc.f7 = 0;
}
else if(s1==1&&s2==0&&s3==1&&s4==0)
{
portc.f4 = 1;
portc.f5 = 0;
portc.f6 = 0;
portc.f7 = 1;
}
else
{
portc.f4 = 0;
portc.f5 = 0;
portc.f6 = 0;
portc.f7 = 0;