> 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 If I understand you correctly, you're using 2 + 7 extra cycles outside of TMR0 so you'd add that to the 71 to make TMR0 run for a shorter time before it rolls over, ie TMR0 counts (256 - (71+2+7)) * 0.25us = 44us. Putting 64 in TMR0 would get you 192 * 0.25us = 48us. I can't explain the 119. You aren't confusing it with 77h are you ? -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu