English
Language : 

PIC18CXX2_13 Datasheet, PDF (59/304 Pages) Microchip Technology – High Performance Microcontrollers with 10-bit A/D
PIC18CXX2
5.2.3 INTERRUPTS
The long write must be terminated by a RESET or any
interrupt.
The interrupt source must have its interrupt enable bit
set. When the source sets its interrupt flag, program-
ming will terminate. This will occur, regardless of the
settings of interrupt priority bits, the GIE/GIEH bit, or
the PIE/GIEL bit.
Depending on the states of interrupt priority bits, the
GIE/GIEH bit or the PIE/GIEL bit, program execution
can either be vectored to the high or low priority Inter-
rupt Service Routine (ISR), or continue execution from
where programming commenced.
In either case, the interrupt flag will not be cleared
when programming is terminated and will need to be
cleared by the software.
TABLE 5-2: LONG WRITE EXECUTION, INTERRUPT ENABLE BITS AND INTERRUPT RESULTS
GIE/
GIEH
X
X
0
(default)
0
(default)
1
0
(default)
1
PIE/
GIEL
X
X
0
(default)
1
0
(default)
1
0
(default)
Priority
X
X
X
1
high priority
(default)
0
low
0
low
1
high priority
(default)
Interrupt
Enable
0
(default)
1
1
1
1
1
1
Interrupt
Flag
Action
X
Long write continues
even if interrupt flag becomes set.
0
Long write continues, will resume operations
when the interrupt flag is set.
1
Terminates long write, executes next instruction.
Interrupt flag not cleared.
1
Terminates long write, executes next instruction.
Interrupt flag not cleared.
1
Terminates long write, executes next instruction.
Interrupt flag not cleared.
Terminates long write,
1
branches to low priority interrupt vector.
Interrupt flag can be cleared by ISR.
Terminates long write,
1
branches to high priority interrupt vector.
Interrupt flag can be cleared by ISR.
5.2.4
UNEXPECTED TERMINATION OF
WRITE OPERATIONS
If a write is terminated by an unplanned event such as
loss of power, an unexpected RESET, or an interrupt
that was not disabled, the memory location just pro-
grammed should be verified and reprogrammed if
needed.
 1999-2013 Microchip Technology Inc.
DS39026D-page 59