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?





Bookmarks