24 I/O PORTS (GPIO)
S1C33L26 TECHNICAL MANUAL
Seiko Epson Corporation
24-3
128pin
package
Pin function 1
CFP
xy
[1:0] = 0x0
(default)
Pin function 2
CFP
xy
[1:0] = 0x1
Pin function 3
CFP
xy
[1:0] = 0x2
Pin function 4
CFP
xy
[1:0] = 0x3
Port function select bit
N/A
PA1
SOUT1
FPDAT17
FPDAT21
CFPA1[1:0]/PMUX_PA_03 register
N/A
PA2
SCLK1
FPDAT18
FPDAT22
CFPA2[1:0]/PMUX_PA_03 register
N/A
PA3
#SRDY1
FPDAT19
FPDAT23
CFPA3[1:0]/PMUX_PA_03 register
N/A
A24
PA4
T16A_ATMA_1
REMC_O
CFPA4[1:0]/PMUX_PA_46 register
N/A
A25
PA5
T16A_ATMB_1
REMC_I
CFPA5[1:0]/PMUX_PA_46 register
N/A
PA6
#ADTRIG
CFPA6[1:0]/PMUX_PA_46 register
N/A
PB0
FPDAT8
I2S_SDO
CFPB0[1:0]/PMUX_PB_03 register
N/A
PB1
FPDAT9
I2S_WS
CFPB1[1:0]/PMUX_PB_03 register
N/A
PB2
FPDAT10
I2S_SCLK
PWM_H
CFPB2[1:0]/PMUX_PB_03 register
N/A
PB3
FPDAT11
I2S_MCLK
PWM_L
CFPB3[1:0]/PMUX_PB_03 register
N/A
PB4
FPDAT12
FPDAT20
CFPB4[1:0]/PMUX_PB_47 register
N/A
PB5
FPDAT13
FPDAT21
CFPB5[1:0]/PMUX_PB_47 register
N/A
PB6
FPDAT14
FPDAT22
CFPB6[1:0]/PMUX_PB_47 register
N/A
PB7
FPDAT15
FPDAT23
CFPB7[1:0]/PMUX_PB_47 register
D8
PC0
CFPC0[1:0]/PMUX_PC_03 register
D9
PC1
CFPC1[1:0]/PMUX_PC_03 register
D10
PC2
CFPC2[1:0]/PMUX_PC_03 register
D11
PC3
CFPC3[1:0]/PMUX_PC_03 register
D12
PC4
CFPC4[1:0]/PMUX_PC_47 register
D13
PC5
CFPC5[1:0]/PMUX_PC_47 register
D14
PC6
CFPC6[1:0]/PMUX_PC_47 register
D15
PC7
CFPC7[1:0]/PMUX_PC_47 register
At initial reset, each I/O port pin (P
xy
) is initialized for the default function (“Pin function 1” in Table 24.2.1).
For information on functions other than the I/O ports, see “Pin Descriptions” in the “Overview” chapter or the de-
scriptions of peripheral modules.
The sections below describe port functions with the pins set as general-purpose I/O ports.
Note: The port function select registers (PMUX_P
x
_
*
) are write-protected. Before these registers can
be rewritten, the write protection must be removed by writing data 0x96 to PPROT[7:0]/GPIO_
PROTECT register. Note that since unnecessary rewrites to the port function select registers
could lead to erratic system operation, PPROT[7:0] should be set to other than 0x96 unless the
port function select registers must be rewritten.
Data Input/Output
24.3
Data input/output control
The I/O ports allow selection of the data input/output direction for each bit using IOC
xy
/GPIO_P
x
_IOC reg-
ister. Set IOC
xy
to 0 (default) to configure the P
xy
port for input; set IOC
xy
to 1 to configure the P
xy
port for
output.
The input/output direction of ports with a peripheral module function selected is controlled by the peripheral
module. IOC
xy
settings are ignored.
Data input
To input an external signal and read out the value, set IOC
xy
to 0 (input mode, default). The I/O port is placed
into high-impedance status and it functions as an input port.
In input mode, the external signal level can be read out directly from P
xy
D/GPIO_P
x
_DAT register. The value
read will be 1 when the input pin is at high level and 0 when it is at low level.
The port pin status can also be read in output mode (IOC
xy
= 1). In this case, the value actually output the port
can be read out from P
xy
D.
Data output
To output data from the port pin, set IOC
xy
to 1 (output mode). The I/O port then functions as an output port,
and the value set in the P
xy
D is output from the port pin. The port pin outputs high level when P
xy
D is set to 1
and low level when set to 0. Writing to P
xy
D is possible without affecting pin status, even in input mode.