10 I/O PORTS (P)
10-18
EPSON
S1C17704 TECHNICAL MANUAL
0x5207/5217: P
x
Port Interrupt Flag Registers (P
x
_IFLG)
Register name Address
Bit
Name
Function
Setting
Init. R/W
Remarks
P0 Port
Interrupt Flag
Register
(P0_IFLG)
0x5207
(8 bits)
D7–0
P0IF[7:0]
P0[7:0] port interrupt flag
1 Cause of
interrupt
occurred
0 Cause of
interrupt not
occurred
0
R/W Reset by writing 1.
P1 Port
Interrupt Flag
Register
(P1_IFLG)
0x5217
(8 bits)
D7–0
P1IF[7:0]
P1[7:0] port interrupt flag
1 Cause of
interrupt
occurred
0 Cause of
interrupt not
occurred
0
R/W Reset by writing 1.
Note
: The letter ‘
x
’ in bit names, etc., denotes a port number 0 or 1.
D[7:0] P
x
IF[7:0]: P
x
[7:0] Port Interrupt Flags
These bits are interrupt flags to indicate the interrupt cause occurrence status.
1 (R):
Cause of interrupt has occurred
0 (R):
No cause of interrupt has occurred (default)
1 (W):
Flag is reset
0 (W):
Has no effect
The
P
x
IF[7:0] bits are the interrupt flags corresponding to the 16 ports (P0[7:0], P1[7:0]) respectively.
The interrupt flag is set to 1 at a specified edge (rising edge or falling edge) of the input signal if
the corresponding P
x
IE[7:0] bit (P
x
_IMSK register) has been set to 1. At the same time, a P0 or P1
interrupt request signal is output to the ITC. The interrupt request signal sets the P0 or P1 port interrupt
flag in the ITC to 1 and an interrupt occurs if other interrupt conditions meet the ITC and S1C17 Core
settings.
The settings shown below are required to manage the cause-of-interrupt occurrence status using the
interrupt flags in the P port module.
1. Set the P0 and P1 interrupt trigger mode in the ITC to level trigger.
2. After an interrupt occurs, reset the P
x
IF[7:0] interrupt flag of the P port module in the interrupt
handler routine (this also resets the interrupt flag in the ITC).
The
P
x
IF[7:0] flags are reset by writing 1.
Note
: To avoid occurrence of unnecessary interrupts, be sure to reset the P
x
IF[7:0] flags
corresponding to the ports used to generate an interrupt before the interrupt is enabled using
P
x
IE[7:0] (P
x
_IMSK register).
∗
P0IE[7:0]
: P0[7:0] Port Interrupt Enable Bits in the P0 Port Interrupt Mask (P0_IMSK) Register
(D[7:0]/0x5205)
∗
P1IE[7:0]
: P1[7:0] Port Interrupt Enable Bits in the P1 Port Interrupt Mask (P1_IMSK) Register
(D[7:0]/0x5215)
Summary of Contents for S1C17704
Page 1: ...TECHNICAL MANUAL S1C17704 CMOS 16 BIT SINGLE CHIP MICROCOMPUTER ...
Page 22: ...1 OVERVIEW 1 10 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Page 42: ...3 MEMORY MAP BUS CONTROL 3 12 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Page 82: ...6 INTERRUPT CONTROLLER ITC 6 26 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Page 108: ...8 CLOCK GENERATOR CLG 8 8 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Page 112: ...9 PRESCALER PSC 9 4 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Page 138: ...10 I O PORTS P 10 26 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Page 156: ...11 16 BIT TIMERS T16 11 18 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Page 208: ...14 8 BIT OSC1 TIMER T8OSC1 14 16 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Page 234: ...16 STOPWATCH TIMER SWT 16 14 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Page 242: ...17 WATCHDOG TIMER WDT 17 8 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Page 264: ...18 UART 18 22 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Page 300: ...20 I2C 20 20 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Page 320: ...21 REMOTE CONTROLLER REMC 21 20 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Page 360: ...24 ON CHIP DEBUGGER DBG 24 6 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Page 362: ...25 BASIC EXTERNAL WIRING DIAGRAM 25 2 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...