| ??? 05/29/03 04:05 Read: times |
#46858 - re: detecting pulse dial Responding to: ???'s previous message |
hello x-man,
here comes a samll programm to solve your problem. In return I expect you to be honest and use your real name, will you? Murugan void timer1_ISR (void) interrupt 3 { TR1 = 0; TH1 = 0Xfb; TL1 = 0Xfb; if (!ohpin) { if(ofyes < 45) ofyes++; onyes = 0; if (newpulse)oldkey++; newpulse = 0; } else { newpulse = 1; if (onyes < 65)onyes++; ofyes=0; } if(onyes==60)offhook = 0; if(ofyes==30)offhook = 1; if(ofyes==40) { pulsedigit=oldkey; oldkey=0; newdigit=1; } TR1 = 1; } |



