Reading and generating square waves at the same time.

It seems to be an output problem, If i turn off the frequency generator so there is no new input it still has jitter, I did have an anlong read in the code and that also made the jitter and accuracy worse. when i took it out it got better. I was poling the input also in previous code and since i changed to interrupts it got better.

Ill do this and get back to everyone in a few mins, Ill take the input code out and just enter different values and see what the output does to take input jitter out of the equation.

What i am thinking about doing is using timer 1 to do an output interrupt but can i do that and change the frequency on the fly or once its set is it set?