6 I/O PORTS (PPORT)
6-14
Seiko Epson Corporation
S1C17M12/M13 TECHNICAL MANUAL
(Rev. 1.2)
6.7.3 P2 Port Group
The P2 port group consists of five ports P20–P24 and they support the GPIO and interrupt functions.
Table 6.7.3.1 Control Registers for P2 Port Group
Register name
Bit
Bit name
Initial
Reset
R/W
Remarks
P2DAT
(P2 Port Data
Register)
15–13 –
0x0
–
R
–
12–8 P2OUT[4:0]
0x00
H0
R/W
7–5 –
0x0
–
R
4–0 P2IN[4:0]
0x00
H0
R
P2IOEN
(P2 Port Enable
Register)
15–13 –
0x0
–
R
–
12–8 P2IEN[4:0]
0x00
H0
R/W
7–5 –
0x0
–
R
4–0 P2OEN[4:0]
0x00
H0
R/W
P2RCTL
(P2 Port Pull-up/down
Control Register)
15–13 –
0x0
–
R
–
12–8 P2PDPU[4:0]
0x00
H0
R/W
7–5 –
0x0
–
R
4–0 P2REN[4:0]
0x00
H0
R/W
P2INTF
(P2 Port Interrupt
Flag Register)
15–8 –
0x00
–
R
–
7–5 –
0x0
–
R
4–0 P2IF[4:0]
0x00
H0
R/W Cleared by writing 1.
P2INTCTL
(P2 Port Interrupt
Control Register)
15–13 –
0x0
–
R
–
12–8 P2EDGE[4:0]
0x00
H0
R/W
7–5 –
0x0
–
R
4–0 P2IE[4:0]
0x00
H0
R/W
P2CHATEN
(P2 Port Chattering
Filter Enable Register)
15–8 –
0x00
–
R
–
7–5 –
0x0
–
R
4–0 P2CHATEN[4:0]
0x00
H0
R/W
P2MODSEL
(P2 Port Mode Select
Register)
15–8 –
0x00
–
R
–
7–5 –
0x0
–
R
4–0 P2SEL[4:0]
0x00
H0
R/W
P2FNCSEL
(P2 Port Function
Select Register)
15–10 –
0x00
–
R
–
9–8 P24MUX[1:0]
0x0
H0
R/W
7–6 P23MUX[1:0]
0x0
H0
R/W
5–4 P22MUX[1:0]
0x0
H0
R/W
3–2 P21MUX[1:0]
0x0
H0
R/W
1–0 P20MUX[1:0]
0x0
H0
R/W
Table 6.7.3.2 P2 Port Group Function Assignment
Port
name
P2SELy = 0
P2SELy = 1
GPIO
P2yMUX = 0x0
(Function 0)
P2yMUX = 0x1
(Function 1)
P2yMUX = 0x2
(Function 2)
P2yMUX = 0x3
(Function 3)
Peripheral
Pin
Peripheral
Pin
Peripheral
Pin
Peripheral
Pin
P20
P20
–
–
UPMUX
*
1
–
–
–
–
P21
P21
–
–
UPMUX
*
1
–
–
–
–
P22
P22
–
–
UPMUX
*
1
–
–
–
–
P23
P23
–
–
UPMUX
*
1
–
–
–
–
P24
P24
–
–
UPMUX
*
1
–
–
–
–
*
1: Refer to the “Universal Port Multiplexer” chapter.