Mike, Sorry I think I misunderstood you I thought you are talking about Another subject that is related to my question. Andre -----Original Message----- I asked: > andre abelian wrote: > > Some thing I can't figure out any help will appreciate. > > Just wondering, was this thread: > "Re: [pic]: timing calculation error" of any help to you? > > Scott Dattalo, Olin Lathrop, Jinx participated. andre abelian replied: > I didn't not read. Every thing was too busy But it was your thread, you asked for help and promised: " any idea or help will appreciate." Scott Dattalo, Olin Lathrop, Jinx spent a lot of time trying to help you. How'bout promised appreciation of their efforts? Just few words in conclusion (if it's problematic to you to choose right words - see hint at the end of this post) Mike. > From: pic microcontroller discussion list > [mailto:PICLIST@MITVMA.MIT.EDU] On Behalf Of andre abelian > Sent: Tuesday, August 05, 2003 3:46 AM > To: PICLIST@MITVMA.MIT.EDU > Subject: [pic]: timing calculation error +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ I have 2 questions. I need to generate 46.25 us interrupt this is how I calculated Using 16 mhz crystal 256-185=71 if I put 71 in timer0 I should get 185/4=46.25 us interrupt. 2 cycle latency for Timer0 and 5 cycle latency for interrupt service routine I get 71-2-5 should be 64 so if I put 64 in timer0 I should get close to 46us but it is not. By changing the number I got TMR0L=119 decimal now I am getting 46us interrupt. My test code is doing timer1 and adc interrupt services too. Does any one know what I am doing wrong? Any help will appreciate. 2. on pulse generation I am not using WDT at all it is disabled in MPLAB ICE but when I clear WDT on timer0 ISR I get better quality pulse (stable) when I remove clear WDT the pulse starts shaky my question is if WDT is disabled then why clearing WDT helps to stabilize the pulse which is BTG portb,0 that is it any idea or help will appreciate. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Hint: "t-h-a-n-k y-o-u" -- 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 PICList is archived three different ways. See http://www.piclist.com/#archives for details.