false condition if statement getting executed inside ISR
Hi,
Just a thought: what is driving the PRX pin? If you drive it from, say, a switch, then you probably get stuck by lacking a proper debouncing of the input (if you don’t understand the problem, just Google “debounce”...).
PRX is then going several times very fast on and off and, if you look at the variables you get the impression that both alternatives are executed at once while in fact there is two interrupts, one going the ON path and the next one going almost immediately to the OFF path then a third one going to the ON path again, finally ruining your time measurement effort...
HTH
Bernard (Ac6)