10 I/O PORTS (P)
S1C17704 TECHNICAL MANUAL
EPSON
10-7
10.7 Port Input Interrupt
The P0 and P1 ports provide an interrupt function.
Any ports within 16 ports can be selected for generating an interrupt. Furthermore, the interrupt condition, whether
an interrupt will be generated at the rising edge or the falling edge, can be selected.
Figure 10.7.1 shows the configuration of the input interrupt circuit.
P0 port
interrupt request
(to ITC)
Chattering filter
Interrupt flag
Interrupt enable
Interrupt edge select
P00
P0CF1[2:0]
P0EDGE0
P0IF0
P0IE0
P07
P0CF2[2:0]
P0EDGE7
P0IF7
P0IE7
• • •
P1 port
interrupt request
(to ITC)
P10
P1EDGE0
P1IF0
P1IE0
P17
P1EDGE7
P1IF7
P1IE7
• • •
Figure 10.7.1 Configuration of Input Interrupt Circuit
Selecting interrupt ports
Select the ports to generate an interrupt 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)
By setting P
x
IE[7:0] to 1, the corresponding port is enabled to generate an interrupt. The port whose P
x
IE bit is
set to 0 (default) does not generate an interrupt.
In addition, it is necessary to set the interrupt controller to actually generate an interrupt. For setting the
interrupt controller, refer to Chapter 6, “Interrupt Controller (ITC).”
Selecting interrupt edge
A port input interrupt can be generated either at the rising edge of the input signal or at the falling edge. Use
P
x
EDGE[7:0] (P
x
_EDGE register) to select the input signal edge to generate an interrupt.
∗
P0EDGE[7:0]
: P0[7:0] Port Interrupt Edge Select Bits in the P0 Port Interrupt Edge Select (P0_EDGE)
Register (D[7:0]/0x5206)
∗
P1EDGE[7:0]
: P1[7:0] Port Interrupt Edge Select Bits in the P1 Port Interrupt Edge Select (P1_EDGE)
Register (D[7:0]/0x5216)
When
P
x
EDGE[7:0] is set to 1, an input interrupt of the corresponding port will be generated at the falling
edge; when the bit is set to 0 (default), an interrupt will be generated at the rising edge.
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 ...