Page 1 of 1

discerning between two square waves

Posted: Wed Jan 07, 2009 5:53 am
by MW
Hi,

I am building an application, based on the ECIO40P, which will need to discern between the following two square waveforms:

1: 425hz Mod @ 25hz, 0.4 seconds on, 0.2 seconds off,0.4 seconds on,2 seconds off, REPEATED
2: 425hz 0.4 seconds on, 0.4 seconds off, REPEATED

These patterns are a ringing and busy/disconnect signal respectivly, as presented by the call progress output of a Mitel MT8880c DTMF transciever. I currently have this connected to RA4 of the ECIO.

Ideally I would like to be able to differentiate between the two but at the very least I need to be able to ignore the first wave form (ringing tone) and react to the second (disconnect).

I have no idea where to start so any and all advice will be greatly received.

Thanks
MW

Re: discerning between two square waves

Posted: Wed Jan 07, 2009 10:25 am
by Benj
Hello

You could do something like this.

Wait for input to go high.
Wait 300ms
Check if the input is still high else return to start

Wait for input to go low
wait 300ms
Check if the input is still low else return to start

Pulse sequence 2 detected.

Re: discerning between two square waves

Posted: Fri Jan 16, 2009 8:13 am
by MW
Thanks Ben. That worked a treat.

MW