Marcel van Lieshout wrote: > 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? Yes. > Reading the > datasheet I would expect this to be the case, but it is not > explicitly written. Actually it is. The processor pushes the address of the next instruction onto the stack, jumps to location 4, and sets the GIE bit to 0 whenever all of the following are true: 1 - An interrupt condition is asserted. This means a xxIF bit is set. 2 - The same interrupt condition is enabled. This means the associated xxIE bit is set. 3 - Interrupts are globally enabled. This means the GIE bit is set. 4 - If the interrupt condition is a "peripheral" interrupt, then peripheral interrupts must also be enabled. This means the PIE bit is set. That's all there's to it. It really is that simple. The processor is never "in" an interrupt. It only performs the interrupt operation when all the right conditions are met, then continues executing code normally. There is nothing magic or special about the interrupt service routine from the processor's point of view, this is only a construct in the programmers thought process. Things are a bit different on the 18 family and more different on the 30 family, but the basic concept is the same. ***************************************************************** Embed Inc, embedded system specialists in Littleton Massachusetts (978) 742-9014, http://www.embedinc.com -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body