Bob Ammerman wrote: > > Yes, if dejittering a single interrupt were the primary goal. However, I > believe the issue here was generating interrupts at 1 millisecond intervals > with no long-term timing creep. > > If you just let timer 1 free run then it will, of course, only generate > interrupts every 65536 instructions, or every 13.1072 milliseconds. > > Bob Ammerman I've used a system like this with good results. I used a free running timer, and manually polled it waiting for the 1ms to be up. Obviously you need to get all your processing etc, all done for that ms first, then sit in a loop polling and waiting for the right time. There will be no jitter at all as there is no int handler. There will be no creep as the timer loops continous, and you simply add the new offset to the current timer count. The only requirement is that the period you are waiting is less than the timer max count (at looping). -Roman -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu