Roman, Your 1 sec timer code is really cool. I think I'd better be off using a modified version of your code rather than mess around by directly loading values into the TMR0 reg. My application is for a "Smart" UPS based on 16f877 using its PWM output. So, if it is to work as planned, it must execute the target routine 3200 (50Hz * 2 * 32 times) times. Won't the Interrupt being called so very often (every 256 cycles) severely reduce the MIPS available to Non ISR Code ? I know this is quite a wierd question. But I just asked it out of curiosity. So as per the calculations given in your page, Xtal_Freq = 2,000,000 Hz (20 Mhz) reqd_Freq = 3200 Hz Therefore, the 24bit value = 1562 (.5 ignored) (Am I right with it ?) And can you please tell me a straightforward method to calculate the jitter ? Thanx a lot! Jeethu Rao -----Original Message----- From: pic microcontroller discussion list [mailto:PICLIST@MITVMA.MIT.EDU]On Behalf Of Roman Black Sent: Saturday, June 23, 2001 1:37 PM To: PICLIST@MITVMA.MIT.EDU Subject: Re: [PIC]: Timer0 Interrupt Timing Jeethu Rao wrote: > > Vasile, > I almost understood your method, but where does the Prescaler value go? > You did'nt write anything about that. Could you please tell me a more > refined version of your algorithm to find out the TMR0 period ? > > Thanking you, > Jeethu Rao > www.jeethurao Hi Jeethu, I put the whole procedure and complete code samples up on this web page: http://centauri.ezy.net.au/~fastvid/one_sec.htm The code will run as it is, flashing a led, and the prescaler setup is clearly shown. :o) -Roman -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details. -- 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