Hi Rikard, On 11-Jul-09, at 6:09 AM, Rikard Bosnjakovic wrote: > On Sat, Jul 11, 2009 at 10:44, Heinz Czychun wrote: > >> But when I enable Timer 1, Timer 0 also starts >> up and starts interrupting the processor. > > Timer0 cannot be turned off until you put the processor to sleep, > which you don't do in your code. Yes, sorry poor wording. Timer 0 is running, but when I reprogram the PIC with Timer 1 enabled (both running and interrupting), Timer 0 also starts interrupting even with the INTCON,T0IE bit cleared. > However, I have never heard of a case > where T0IE being enabled when Timer1 is started. Ok so this is unusual. > > In your code: > > bcf INTCON,T0IF ; clear TMR0 interrupt flag > MainLoop: > goto MainLoop ; go back and get a knew ADC value > > just before the bcf, try adding a "bcf INTCON, T0IE" as well and see > if that helps. I'm aware you clear the IE earlier, but clearing it > again won't hurt. Tried your suggestion and yes it didn't hurt, but also didn't change the situation. > - > - Rikard - http://bos.hack.org/cv/ > Thanks, Heinz -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist