I'm working on a low latency IR light curtain.
On the receiver side, I need to extract a 4 Khz synchronization pulse from a 10% duty waveform that has lots of phase jitter on both edges.
The frequency of the waveform will be highly stable and accurate, since it's derived from IR send by a crystal controlled transmitter. However, the duty cycle and phase will "jitter" significantly.
I think I could do a software PLL to create a stable waveform at the frequency of the transmitter at a desired duty cycle and phase locked to something like an average, or perhaps maximum delay of the incoming waveform. But, the math may be a bit much for the Attiny44/84 running at 8 Mhz.
I'm looking for suggestions on potentially better (simpler) implementations or an implementation of something like a PLL running on an Attiny at something like 4 khz.