By Joop's calculation:
"... The remaining routines are where extra processing gets done. It is critical that all processing is complete before the next TCNT2 interrupt occurs, which depends on the TX pulse rate, TX pulse width, and sampling time.
If the pulse rate = 600Hz, pulse width = 100us, and max sampling time = 35us then the processing time available is 1667us - 100us - 35us = 1532us.
With a 16MHz clock we have an instruction cycle of 0.0625us, so there is time for 24512 code instructions, including calls and returns..."
We'll have 1532uS available for the remaining stuff to add to code if like.
So each spared uS is valuable in case you want to add more functionalities to code later.
"... The remaining routines are where extra processing gets done. It is critical that all processing is complete before the next TCNT2 interrupt occurs, which depends on the TX pulse rate, TX pulse width, and sampling time.
If the pulse rate = 600Hz, pulse width = 100us, and max sampling time = 35us then the processing time available is 1667us - 100us - 35us = 1532us.
With a 16MHz clock we have an instruction cycle of 0.0625us, so there is time for 24512 code instructions, including calls and returns..."
We'll have 1532uS available for the remaining stuff to add to code if like.
So each spared uS is valuable in case you want to add more functionalities to code later.
Comment