I would appreciate any views on the following question, since I am about to freeze my code! I have e-mailed Microchip directly but have not yet received a response. Perhaps someone here has practical experience? In a nutshell, my question is whether it is possible for an interrupt to occur during a "BCF INTCON,GIE" instruction on any of the 16F87X family. I started working with the PIC16C84 back in 1993, at which time section 3.12 (Interrupts) of the data sheet stated in Note 2: "If an interrupt occurs while the Global Interrupt Enable (GIE) bit is being cleared, the GIE bit may unintentionally be re-enabled by the user's Interrupt Service Routine (the RETFIE instruction) ..." As a result, I have got into the habit on all PICs of clearing GIE using a sequence such as: LOOP BCF INTCON,GIE BTFSC INTCON,GIE GOTO LOOP However, whilst converting some code to run in a PIC16F627, I discovered the following new Note 2 in section 14.6 of the PIC16F62X data book: "When an instruction that clears the GIE bit is executed, any interrupts that were pending for execution in the next cycle are ignored ..." I assume that this provision prevents the problem which the above loop was intended to cure, and that in the 16F62X it is adequate to use just: BCF INTCON,GIE Furthermore, I have found a note in Table B-1 of the PIC16F84A data sheet which suggests that the above problem also does not apply to the PIC16F83/84/84A or the PIC16CR83/84. So far, so good... However, I am also in the process of adapting some PIC16C84 code to run in a PIC16F870, and I have not been able to find any indication in the latter data book as to whether this problem exists or has been cured (section 11.10 "Interrupts" does not contain a corresponding Note 2). I have been unable to recreate this problem scenario on the PIC16F870 during a brief simulation using MPLAB, and so I imagine that it probably does not apply. However, I do not wish to remove the safeguard of the extra loop unless I am 100% sure of this, as I do not wish to run the risk of intermittent failures due to interrupts occasionally remaining active during critical code sections in which they should be disabled. Thanks in advance for any firm pointers. -- Ian Chapman Chapmip Technology, UK -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics