discerning between two square waves

Any general or miscellaneous queries that do not fit into the other forum catagories

Moderators: Benj, Mods

Post Reply
MW
Posts: 38
Joined: Mon Feb 26, 2007 2:04 am
Has thanked: 4 times
Been thanked: 2 times
Contact:

discerning between two square waves

Post 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

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: discerning between two square waves

Post 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.

MW
Posts: 38
Joined: Mon Feb 26, 2007 2:04 am
Has thanked: 4 times
Been thanked: 2 times
Contact:

Re: discerning between two square waves

Post by MW »

Thanks Ben. That worked a treat.

MW

Post Reply