> -----Original Message----- > From: Bob Ammerman [SMTP:RAMMERMAN@PRODIGY.NET] > Sent: Thursday, February 22, 2001 12:22 PM > To: PICLIST@MITVMA.MIT.EDU > Subject: Re: [PIC] Timer Tribulations > > As I said before: > > Do _NOT_ preload TMR0. > > Instead ADD to TMR0. > > For a period of 250 cycles the correct value is: > > 256-250+2 == 8 > > The +2 is needed because the timer doesn't update for two cycles when it > is > written to (by the ADD). > > I have done this. It WORKS! > > Bob Ammerman > RAm Systems > (contract development of high performance, high function, low-level > software) > Bob is perfectly correct. By adding a constant to the timer, you effectively remove the only variable in the problem: the interrupt latency. Mike -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics