C8051F360/1/2/3/4/5/6/7/8/9
On exit from the PCA interrupt service routine, the CIP-51 will return to the ADC0 Window Comparator
ISR. On execution of the RETI instruction, SFR Page 0x00 used to access the PCA registers will be auto-
matically popped off of the SFR Page Stack, and the contents of the SFRNEXT register will be moved to
the SFRPAGE register. Software in the ADC0 ISR can continue to access SFR’s as it did prior to the PCA
interrupt. Likewise, the contents of SFRLAST are moved to the SFRNEXT register. Recall this was the
SFR Page value 0x0F being used to access OSCICN before the ADC0 interrupt occurred. See Figure 9.7
below.
SFR Page 0x00
Automatically
popped off of the
stack on return from
interrupt
0x00
SFRPAGE
(ADC0)
SFRNEXT
popped to
SFRPAGE
0x0F
SFRNEXT
(OSCICN)
SFRLAST
popped to
SFRNEXT
SFRLAST
Figure 9.7. SFR Page Stack Upon Return From PCA Interrupt
92
Rev. 1.0