I need to monitor the jitter of some short pulses with a length of approximately 500µs. The max. valid jitter is 4µs. I need to do some statistics which are not available within our scopes at work.
Measuring these pulses should be easy with the input capture feature of an AVR. BUT the delay between each pulse can be up to is 130ms. The min. resolution I need is 500ns. So the longest time interval I can measure with a 16bit timer is 500ns * 65536 = 32ms.
I've been thinking about a simple solution, how to enhance the timer resolution to 24 bits.
I could increment a variable whenever the timer overflows. But what if the overflow and the capture event happen simultaneous? The input capture vector has the higher precedence and thus I would miss to update my variable in time.
Any ideas for a workaround? The device should be as simple as possible and really straight forward. It will be placed on a stripboard. I'm planning to use a FT232R and an ATmega48.