7-7
Seiko Epson Corporation
S1C31D50 TECHNICAL MANUAL
(Rev. 1.00)
7.5.
Interrupts
When the GPIO function is selected for the port with an interrupt function, the port input interrupt
function can be used.
Table 7.5.1 Port Input Interrupt Function
Interrupt
Interrupt flag
Set condition
Clear condition
Port input
interrupt
PPORTP
x
INTF.P
x
IF
y
Rising or falling edge of the input signal
Writing 1
PPORTINTFGRP.P
x
INT
Setting an interrupt flag in the port g
roup
Clearing PPORTP
x
INTF.P
x
IF
y
Interrupt edge selection
Port input interrupts will occur at the falling edge of the input signal when setting the
PPORTP
x
INTCTL. P
x
EDGE
y
bit to 1, or the rising edge when setting to 0.
Interrupt enable
PPORT provides interrupt enable bits (PPORTP
x
INTCTL.P
x
IE
y
bit) corresponding to each interrupt
flag. An interrupt request is sent to the CPU core only when the interrupt flag, of which interrupt
has been enabled by the interrupt enable bit, is set. For more information on interrupt control, refer
to the “Interrupt” chapte
r.
Interrupt check in port group unit
When interrupts are enabled in two or more port groups, check the PPORTINTFGRP.P
x
INT bit in the
interrupt handler first. It helps minimize the handler codes for finding the port that has generated
an interrupt. If this bit is set to 1, an interrupt has occurred in the port group. Next, check the
PPORTP
x
INTF.P
x
IF
y
bit set to 1 in the port group to determine the port that has generated an
interrupt. Clearing the PPORTP
x
INTF.P
x
IF
y
bit also clears the PPORTINTFGRP.P
x
INT bit. If the port is
set to interrupt disabled status by the PPORTP
x
INTCTL. P
x
IE
y
bit, the PPORTINTFGRP.P
x
INT bit will
not be set even if the PPORTP
x
INTF.P
x
IF
y
bit is set to 1.
Summary of Contents for S1C31D50
Page 461: ...25 1 Seiko Epson Corporation S1C31D50 TECHNICAL MANUAL Rev 1 00 25 Package TQFP12 48PIN ...
Page 462: ...25 2 Seiko Epson Corporation S1C31D50 TECHNICAL MANUAL Rev 1 00 QFP13 64PIN ...
Page 463: ...25 3 Seiko Epson Corporation S1C31D50 TECHNICAL MANUAL Rev 1 00 TQFP14 80PIN ...
Page 464: ...25 4 Seiko Epson Corporation S1C31D50 TECHNICAL MANUAL Rev 1 00 QFP15 100PIN ...