Quote Originally Posted by skimask View Post
What do you mean by '100 ticks out'?
Do you mean that it's over 100 ticks off of what you calculated to be the reload value?
If that's the case, you might be forgetting about the overhead of the program itself (2 cycles to jump in, 2 cycles out, a couple of cycles to reload the timer itself, and so on)...
Or something different?
Maybe your 20Mhz is off?
Yes - that's what I meant. I imagined that the programme overhead would mop up 'some' 'ticks' but I was surprised when it ended up at 107 adrift. The oscillator frequency is a good point - I'll check that. At the end of the day I can adjust the programme to get the frequency as close as I need so I guess I shouldn't be too concerned

Thanks for your input

Adrian