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
discerning between two square waves
- 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
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel