I am relatively new to using Pics and would be grateful if anyone can shed some light on a interrupt problem I have encountered using a PIC 16C64. I have written code for a 16C64 which basically decodes eight serial bytes of data,stores them in sequential registers,and once they are all stored outputs them on the i2c bus,via a slave transmitter. The code is written in two sections: Section 1: The main program 1 loops round waiting for a flag being set which indicates all the bytes are stored in sequential storage registers. This decoding uses three sources of Interrupt RB0/INT,Interrupt on change,and Timer0 overflow,each Interrupt being enabled sequentially and only one being enabled one at a time. This section of code works fine. Once the flag is set the program jumps to section 2. Section 2: Section two enables only i2c interrupts by setting the SSPIE bit in PIE1 register,and GIE and PEIE in INTCON register. PIE1 is set in the initialisation section of the program not in section 2,INTCON is setup in section 2. Main loop 2 loops round waiting for a flag being set which indicates the end of the transmission of the 8 data bytes,at which point it returns to the data decode and storage section in section 1. The i2c interrupt is generated by an address match,via a key being pressed on a PC. This section also works fine and provided I do not initiate an i2c interrupt until all the bytes are in I receive all eight bytes correctly at the end of the decode and storage section. What puzzles me however is that if I initiate an i2c interrupt in the data decode and storage section,I would expect the bus to 'hang' as the interrupt should not be serviced since it is NOT enabled. What happens however is the bus appears to 'hang',but once all the bytes are stored they are output correctly,it appears that the i2c interrupt is 'stored' and once I enable it in section 2 it is then serviced. I do appreciate that flags get set even though interrupts are not enabled. I would be most grateful for any assistance on this,since although the code works as I want,i.e. the i2c interrupt is serviced immediately after the first section although I have not initiated one here to my knowledge. The code is sequential,and the two sets of interrupts are also only enabled seperately,so why should trying to initiate an interrupt in a section of code where it is NOT enabled,be serviced as soon as I enable the interrupt,but do not try to initiate it. I hope that someone can help me regards the above,also is there a way to write the code such that there is only one main loop and interrupt prioritising. Ideally enable both i2c and decode interrupts service the first one and ignore the other till after the first has been serviced. Thanks in advance for a PIC beginner.