PIC12F635/PIC16F636/639
2.2.2.5 PIR1 Register
The PIR1 register contains the interrupt flag bits, as
shown in Register 2-5.
Note:
Interrupt flag bits are set when an interrupt
condition occurs, regardless of the state of
its corresponding enable bit or the Global
Interrupt Enable bit, GIE (INTCON<7>).
User software should ensure the
appropriate interrupt flag bits are clear
prior to enabling an interrupt.
REGISTER 2-5:
PIR1 – PERIPHERAL INTERRUPT REQUEST REGISTER 1 (ADDRESS: 0Ch)
R/W-0
EEIF
R/W-0
LVDIF
R/W-0
CRIF
R/W-0
C2IF(1)
R/W-0
C1IF
R/W-0
OSFIF
U-0
R/W-0
—
TMR1IF
bit 7
bit 0
bit 7
EEIF: EEPROM Write Operation Interrupt Flag bit
1 = The write operation completed (must be cleared in software)
0 = The write operation has not completed or has not been started
bit 6
LVDIF: Low-Voltage Detect Interrupt Flag bit
1 = The supply voltage has crossed selected LVD voltage (must be cleared in software)
0 = The supply voltage has not crossed selected LVD voltage
bit 5
CRIF: Cryptographic Interrupt Flag bit
1 = The Cryptographic module has completed an operation (must be cleared in software)
0 = The Cryptographic module has not completed an operation or is Idle
bit 4
C2IF: Comparator 2 Interrupt Flag bit(1)
1 = Comparator output (C2OUT bit) has changed (must be cleared in software)
0 = Comparator output (C2OUT bit) has not changed
bit 3
C1IF: Comparator 1 Interrupt Flag bit
1 = Comparator output (C1OUT bit) has changed (must be cleared in software)
0 = Comparator output (C1OUT bit) has not changed
bit 2
OSFIF: Oscillator Fail Interrupt Flag bit
1 = System oscillator failed, clock input has changed INTOSC (must be cleared in software)
0 = System clock operating
bit 1
Unimplemented: Read as ‘0’
bit 0
TMR1IF: Timer1 Interrupt Flag bit
1 = Timer1 rolled over (must be cleared in software)
0 = Timer1 has not rolled over
Note 1: PIC16F636/639 only.
Legend:
R = Readable bit
- n = Value at POR
W = Writable bit
‘1’ = Bit is set
U = Unimplemented bit, read as ‘0’
‘0’ = Bit is cleared x = Bit is unknown
DS41232B-page 24
Preliminary
© 2005 Microchip Technology Inc.