Detecting varying PWM states

The problem is my main loop has some functions that make sampling that fast difficult. Do you suggest a routine with a periodic interrupt? Hopefully there is a simpler solution than this if I am understanding you?

@lastchancename The scale is of signal peak is HIGH (5v) and 0V. Sorry unclear.