Bob Blick wrote: > 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. Yes, unless you want to go to the trouble of synchronizing the prescaler using code like the example I posted. > 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)? Yes, or just let it free-run anyway and handle it as above. > Does that seem like a useful rule of thumb? Yes. > Or is TMR0 possibly advanced while you are in the process of > adding to it? TMR0 (and/or its prescaler) is DEFINITELY advanced while you're writing to it, so you need to make allowances for that. The easiest way, in general, is to just make a rough guess as to the reload value, then fine-tune that value by observing the program's behavior on a scope. -Andy === Andrew Warren - fastfwd@ix.netcom.com === Fast Forward Engineering - Vista, California === === Custodian of the PICLIST Fund -- For more info, see: === http://www.geocities.com/SiliconValley/2499/fund.html