Performance

heh, well the datasheet says it takes 4 clocks to get into the ISR and 4 clocks to get out again. The chip runs at 16MHz. your loop has a delay and a serial.write, both of which take aaages compared to a measly couple dozen clocks or so.

In theory, you'd be able to generate frequencies up to almost a megahertz if you hand-tweaked the assembly.

In fact, I've seen projects that directly generated radio frequencies using a PWM output and modulated it from code, then did some gating on the rx side to receive.