Re: radio frequency broadcasting

Yes, I can confirm that the rate you get is highly dependent on the kind of code you have in your loop, and that timer interrupts will cause slight distortions in your exact frequency. It is a toggle using XOR, so your square wave frequency will be half the number of iterations per second. On the other hand, because it is a square wave and not a pure sine wave, you will get harmonics at every integer multiple of the base frequency, though the energy in each higher harmonic will become weak very quickly.

If you have an oscilloscope, it is very helpful to see exactly what the square wave looks like, and visually determine the amount of time it takes for each full wave. I have a very old (vintage 1974) scope that still works great for this kind of thing.

One thing you can do is to make sure you put a long wire attached to the output pin you are toggling, as an antenna... with mine hooked up to a 8-meter long piece of wire that runs out my window, I was able to receive the signal all inside my house and around my yard outside.