Just wondering: why am I so many people's uncle? Bob Ammerman RAm Systems ----- Original Message ----- From: "Russell McMahon" To: Sent: Wednesday, November 27, 2002 6:07 AM Subject: Re: [PIC]: Clock accuracy > > To get a period of 250 out of TMR2 you set the PR2 register to 249! > > And bingo, Bob's your uncle. > 251/250 too long = 1 in 250 = 1 extra second per 4 minutes 10 seconds. > QED. > > I think Bob, and Andrew Warren with a more general take on the same thing, > have hit the nail on the head. > > > RM > > > > > I initialized TMR2 with prescaler 4, postscaler 1:1 and period 250. > > > > .... > > > > clock lags behind about a second in 4 minutes. IMHO, the error is > > > > too big to fix it only in software. So there must be something else > > > > wrong. > > > > > -- > http://www.piclist.com hint: To leave the PICList > mailto:piclist-unsubscribe-request@mitvma.mit.edu > > -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu