Yes. The only thing you then have to worry about is that an interrupt could fire multiple times, but it will only run the interrupt handling routine once. Each interrupt source has a flag which indicates whether the interrupt has triggered or not. Once the flag is set, it's set until you clear it in the interrupt code. When you clear GIE, it will ignore those flags. When GIE is set it will constantly interrupt until all those flags are cleared. So if an interrupt triggers multiple times when GIE is off, it only has one bit saying it's fired, not how many times it's fired. I doubt this'll be an issue in your code, but it's good to know for future projects. Also, some processors indicate that you should clear GIE in a loop - there is one condition where GIE will be set again if an interrupt occurs while the BCF GIE is taking place: loop clear GIE If GIE is set, goto loop ' Protected code Set GIE I hope this helps! -Adam Marcel van Lieshout wrote: >Thank you all for the answers. Is it correct to state that interrupts that >occur during the no-interrupt-period will fire the interruptroutine as soon >as the GIE bit is set again? Reading the datasheet I would expect this to be >the case, but it is not explicitly written. > >Marcel > >-- >http://www.piclist.com hint: The PICList is archived three different >ways. See http://www.piclist.com/#archives for details. > > > > > -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body