English
Language : 

PIC16F1938 Datasheet, PDF (89/452 Pages) Microchip Technology – 28/40/44-Pin Flash-Based, 8-Bit CMOS Microcontrollers
7.0 INTERRUPTS
The interrupt feature allows certain events to preempt
normal program flow. Firmware is used to determine
the source of the interrupt and act accordingly. Some
interrupts can be configured to wake the MCU from
Sleep mode.
This chapter contains the following information for
Interrupts:
• Operation
• Interrupt Latency
• Interrupts During Sleep
• INT Pin
• Automatic Context Saving
Many peripherals produce Interrupts. Refer to the cor-
responding chapters for details.
A block diagram of the interrupt logic is shown in
Figure 7-1.
FIGURE 7-1:
INTERRUPT LOGIC
PIC16(L)F1938/9
IOCBNx
D
Q
CK
R
Q4Q1
Edge
Detect
RBx
IOCBPx
Q2
D
Q
CK
R
Data Bus =
0 or 1
Write IOCBFx
DS Q
CK
To Data Bus
IOCBFx
IOCIE
From all other
IOCBFx Individual
Pin Detectors
IOC Interrupt
to CPU Core
Q1
Q1
Q1
Q2
Q2
Q2
Q3
Q3
Q3
Q4 Q4
Q4
Q4
Q4Q1
Q4Q1
Q4Q1
Q4Q1
 2011 Microchip Technology Inc.
Preliminary
DS41574A-page 89