(added PIC tag so others can see your message too) Is there any particular reason you would need to stop the ticking, or just want to stop it to generating interrupts? > Is the best way to find if timer 0 caused the interrupt by anding T0IF and T0IE? Yes, you can do that if you do not want to introduce a new flag for that. Also what you can do is like: BTFSC INTCON, T0IE BTFSS INTCON, T0IF GOTO NON-Timer0 Timer0_ISR .... .... Tamas ---------- Forwarded message ---------- From: Gordon Williams Date: Fri, May 7, 2010 at 4:12 AM Subject: Turning off TMR0 ? To: pic microcontroller discussion list I have different peripherals triggering an interrupt routine and then I look for the particular flag that triggered the interrupt. I would like to turn timer 0 off from time to time and when it is off I don't want the T0IF flag to turn on. There doesn't appear to be any why that I can stop the clock. Is there? I can disable the interrupt, but the clock keeps ticking and T0IF will still get set when it rolls over. Is the best way to find if timer 0 caused the interrupt by anding T0IF and T0IE? The other thing that I though of was to change it over to counter mode and have pinA4 as an input. But then I loose the use of that pin. I'm using 16F8886 if that makes any difference. Am I missing something? Thanks, Gordon Williams -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist -- int main() { char *a,*s,*q; printf(s="int main() { char *a,*s,*q; printf(s=%s%s%s, q=%s%s%s%s,s,q,q,a=%s%s%s%s,q,q,q,a,a,q); }", q="\"",s,q,q,a="\\",q,q,q,a,a,q); } -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist