Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
11 years, 11 months ago.
Detect waveform of specific period and duty cycle by using serial port/digitalIn?
Hello, As far as I understand, serial line is able to detect and process frames which have valid stop bits/end bit, and 8 bits in between. How would I go about detecting a waveform with a specific duty cycle and period by using mbed, does anyone have any examples? The waveform is not in the format of a serial frame. Is it possible to do with rx/digitalIn lines?
If you are talking about a square wave, then you can use the InterruptIn class, and call interrupt service routines on the rising and falling edges to calculate what duty cycle and period the input signal has.
posted by Jason Garner 11 Jan 2013