Hi, yes, it is possible to check the IT flags. However, you should reset the flags the same way as in the ISR. To answer the question which flags are re-set, see the following: all the IT's have their individual enable flags (maybe associated with any group or global flag), ending with E, e. g. INTE. then the IT will set the associated F flag (e. g. INTF). You must evaluate these, and reset that caused the interrupt actually. In the majority of cases, the E and F bits are in the same register. Not always, but more and more often ("nicht immer, aber immer šfter!"). Imre On Wed, 26 Aug 1998, Nuno Pedrosa wrote: > Hi! How do I deal with interrupts in PIC16x.. ? > > Here's what I (think) know: > - Single int vector in 0x0004 > - I need to check which int to handle in the routine > > But, what flags are changed upon an interrupt call, and which flags are > recovered after the int call? > > >From the docs, I think it's possible to use the ints in a polling way. > I would do this by disabling the GIE (mask off all ints) and then, in > the code, check the individual flags. > Is this possible? > > Thank you, > Nuno. > > -- > .^. _,^,_ /\ > ___( | )_____ Nuno Filipe Freitas Pedrosa __________ o(`} | , __/\/ /__ > /*\\|//*\ SIEMENS S.A. Portugal (]| /' \ \/\ > \(\\V//)/ mailto:Nuno.Pedrosa@oen.siemens.de (]|`% (") \/\ \ > ` -=- ' Tel. :00351-1-4242454 (") /`/ / /\/ > __B//|\\P___________________________________________\' / `/______\/____ > `-' "Try and leave this world a little better than you found it..." > >