Originally posted by kosacid
View Post
Joop calculated roughly the remained time:
"...// 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..."
So it's a ~20 000 tics time frame, within the rest of code can be written without any fears.
Hopefully quite enough for all the "jingle&bells" one decent PI may have.
But there is another risk; since two timers are involved. Giving only third timer to freely play with it.
Buttons are desirable. But polling must be done in a smart fashion. I am examining several options now.
Comment