6 I/O PORTS (PPORT)
6-6
Seiko epson Corporation
S1C17F13 TeChniCal Manual
(Rev. 1.0)
PPORT issues a reset request immediately after all the input pins specified by the PCLK.KRSTCFG[1:0] are
set to a low level if the chattering filter function is disabled (initial status). To issue a reset request only when
low-level signals longer than the time configured are input, enable the chattering filter function for all the ports
used for key-entry reset.
The pins configured for key-entry reset can also be used as general-purpose input pins.
Interrupts
6.5
When the GPIO function is selected for the port with an interrupt function, the port input interrupt function can be
used.
5.1 Port Input Interrupt Function
Table 6.
Interrupt
Interrupt flag
Set condition
Clear condition
Port input interrupt P
x
INTF.P
x
IF
y
Rising or falling edge of the input signal
Writing 1
PINTFGRP.P
x
INT
Setting an interrupt flag in the port group
Clearing P
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 P
x
INTCTL.P
x
EDGE
y
bit
to 1, or the rising edge when setting to 0.
Interrupt enable
PPORT provides interrupt enable bits (P
x
INTCTL.P
x
IE
y
bit) corresponding to each interrupt flag. An inter-
rupt request is sent to the interrupt controller 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 Controller”
chapter.
Interrupt check in port group unit
When interrupts are enabled in two or more port groups, check the PINTFGRP.P
x
INT bit in the interrupt han-
dler 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 P
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 P
x
INTF.P
x
IF
y
bit also clears the PINTFGRP.
P
x
INT bit. If the port is set to interrupt disabled status by the P
x
INTCTL.P
x
IE
y
bit, the PINTFGRP.P
x
INT bit
will not be set even if the P
x
INTF.P
x
IF
y
bit is set to 1.
Control Registers
6.6
This section describes the same control registers of all port groups as a single register. For the register and bit con-
figurations in each port group and their initial values, refer to “Control Register and Port Function Configuration of
this IC.”
P
x
Port Data Register
Register name
Bit
Bit name
Initial
Reset
R/W
Remarks
P
x
DAT
15–8 P
x
OUT[7:0]
0x00
H0
R/W –
7–0 P
x
IN[7:0]
0x00
H0
R
*
1: This register is effective when the GPIO function is selected.
*
2: The bit configuration differs depending on the port group.
*
3: The initial value may be changed by the port.
Bits 15–8 P
x
OuT[7:0]
These bits are used to set data to be output from the GPIO port pins.
1 (R/W): Output high level from the port pin
0 (R/W): Output low level from the port pin
When output is enabled (P
x
IOEN.P
x
OEN
y
bit = 1), the port pin outputs the data set here. Although
data can be written when output is disabled (P
x
IOEN.P
x
OEN
y
bit = 0), it does not affect the pin status.
These bits do not affect the outputs when the port is used as a peripheral I/O function.