Chen Xiao Fan wrote: > Long log time ago, there was a bug with some 16F chips. > In order to disable all interrupt, the following sequences > were needed (in PICC). > > /* Disable all interrupt*/ > do GIE = 0; > while (GIE); > INTCON = 0; Actually this bug never applied to a 16F chip as far as I know. I deal with this in my PIC development environment by setting INTR_OFF_BUG to 1 for the afflicted chips. I got the list from Microchip a long time ago, and it can be seen in the STD_DEF.INS.ASPIC file. The effect of INTR_OFF_BUG 1 is to have my INTR_OFF macro perform the additional checking you show above, whereas when INTR_OFF_BUG is 0 it just emits BCF INTCON, GIE. ***************************************************************** Embed Inc, embedded system specialists in Littleton Massachusetts (978) 742-9014, http://www.embedinc.com -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist