>> > Would it also be OK to add 50 to it, in case you might have been >> > busy with something else and it advanced to 1. I know I'm not >> > explaining myself very well, I hope you understand what I mean :-) >> >> I understand exactly what you mean... In fact, adding to (or >> subtracting from) TMR0 is the best way to reload it, for exactly the >> reason you describe. > >If I am not mistaken, this 'benefit' would be almost lost if you >had other than a 1:1 prescaler as the prescaler value would be >cleared and lost. > >I do make use of this technique for timing but the lost cycle/s >on the write to TMR0 need to be watched out for especially when >you use no prescaler. So the idea would be: If the prescaler is used, never to do any writes to TMR0 if you wish to preserve the accuracy of continuous timing(I'm thinking propeller clock here, of course), just let the timer free run and keep track of your count elsewhere. If you are not using the prescaler, use the add-to-TMR0 method(which is when you'd most likely need it anyway, since you'd certainly miss some counts, and not a predictable number of them, since interrupt response time varies)? Does that seem like a useful rule of thumb? Or is TMR0 possibly advanced while you are in the process of adding to it? -Bob http://www.bobblick.com/