On Mon, 19 Feb 2001, Olin Lathrop wrote: > There are lots of ways to do this. One way is to "unwrap" timer 1 in the > foreground processing loop. Nothing will be lost as long as you get to it > once every 65000 instructions, and that's at a prescaler of 1:1. In other > words, you periodically look at timer 1 to find the new amount it got > incremented since the last time you checked. This time increment is then > added to a software counter that can have as many bits as you need. Note > that you only really need to look at the high byte of timer 1 when doing > unwrapping. This is a bit more tricky to think thru, but also more > efficient. > This is an interesting ideea. But is not more easy to check only the tmr1if bit, to reset that bit and to increment the software counter every time after that ? What would be the benefit of reading the tmr1h register instead ? ( except when is important to know the whole value of TMR1...) Vasile -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu