Read an input signal with just ONE INTERRUPT!!!

aarg:
So this is a commercial enterprise? Should you be asking for free help then?

It is not commercial.