
C165H
Interrupt and Trap Functions
Data Sheet
114
2001-04-19
PRELMNARY
programmed to X11
B
, both a positive and a negative transition will set the request flag.
In all three cases, the contents of the core timer T3 will be captured into the auxiliary
timer registers T2 or T4 based on the transition at pins T2IN or T4IN. When the interrupt
enable bits T2IE or T4IE are set, a PEC request or an interrupt request for vector T2INT
or T4INT will be generated.
Note:
The non-maskable interrupt input pin NMI and the reset input RSTIN provide
another possibility for the CPU to react on an external input signal. NMI and RSTIN
are dedicated input pins, which cause hardware traps.
-EXCERPT-
Interrupt signals may be connected to:
EX7IN...EX0IN, the fast external interrupt input pins,
T4IN, T2IN, the timer input pins,
For each of these pins either a positive, a negative, or both a positive and a negative
edge selection is performed in the control register of the peripheral device associated
with the respective port pin. The peripheral must be programmed to a specific operating
mode to allow generation of an interrupt by the external signal. The priority of the
interrupt request is determined by the interrupt control register of the respective
peripheral interrupt source, and the interrupt vector of this source will be used to service
the external interrupt request.
Note:
In order to use any of the listed pins as external interrupt input, it must be switched
to input mode via its direction control bit DPx.y in the respective port direction
control register DPx.
Pins T2IN or T4IN can be used as external interrupt input pins when the associated
auxiliary timer T2 or T4 in block GPT1 is configured for capture mode. This mode is
selected by programming the mode control fields T2M or T4M in control registers
T2CON or T4CON to 101
B
. The active edge of the external input signal is determined by
bit fields T2I or T4I. When these fields are programmed to X01
B
, interrupt request flags
T2IR or T4IR in registers T2IC or T4IC will be set on a positive external transition at pins
T2IN or T4IN, respectively. When T2I or T4I are programmed to X10
B
, then a negative
external transition will set the corresponding request flag. When T2I or T4I are
Table 18
Pins to be used as External Interrupt Inputs
Port Pin
Original Function
Control Register
P2.7-0/EX7-0IN
Fast external interrupt input pin
EXICON
P3.7/T2IN
Auxiliary timer T2 input pin
T2CON
P3.5/T4IN
Auxiliary timer T4 input pin
T4CON