Measruing PWM widths with interrupts


i need measure widths of pwm type signal contains 3 pulses repeating every 1 sec.
this signal
b40_signal

i planning use pinchange interrupts on d6 in case free , in range.
but handling gets bit complicated have track timings of gaps pulses determine reading.

i.e.   ----1 sec gap----pulse1---gap----pulse2----gap----pulse3--->

can knowledgeable on interrupts me out?

quote
but handling gets bit complicated
why? using pin change interrupt means called when pin goes high , when goes low. time between going high once , going high again tells 1 thing. time between going high , going low tells else.


Arduino Forum > Using Arduino > Programming Questions > Measruing PWM widths with interrupts


arduino

Comments