Heinz Czychun wrote: >> INTCON,T0IE = 0 disables TMR0 interrupts. IE = 0 for any interrupt >> source disables it. source As TMR0 has no off/on control it will >> start generating interrupts as soons as T0IE and GIE are set > > Yes, that was my observations. I could control the TMR0 interrupts > with the INTCON,T0IE setting. But when I reprogrammed for Timer 1 > enabled, and interrupting, the setting of the INTCON,T0IE became > irrelevant. Note that the ...IE flags only determine whether the corresponding ...IF flags generate an interrupt when set. That's why you have to check both the ...IF and the ...IE flags in an interrupt routine if you want to disable an interrupt in firmware. > Timer 0 would always start generating interrupts. What do you mean by this? That T0IF is set in the interrupt routine, or that the interrupt was caused by T0IF being set? These two are different. Unless you actually shut down timer 0 (e.g. by not having anything connected to T0CKI and setting T0SS), the T0IF flag will be set sooner or later. If T0IE is 0, this will not cause an interrupt -- but it still will be set. And if another interrupt flag causes an interrupt, you will see it in the interrupt routine. So... if you don't care about timer 0, don't check T0IF and it being set won't bother you. If you want to disable and enable the timer 0 interrupt in your firmware, you need to check both T0IF and T0IE in the interrupt routine and only consider a timer 0 interrupt if both are set. This goes pretty much for all PIC interrupts. Check out the timer 0 (4-1) and interrupt logic (9-10) block diagrams in the data sheet. Gerhard -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist