10 I/O PORTS (P)
10-6
Seiko Epson Corporation
S1C17651 TECHNICAL MANUAL
PxINy corresponds directly to the Pxy pin. The pin voltage level can be read out when input is enabled
(PxIENy = 1) (even if output is also enabled (PxOENy = 1)). The value read out will be 1 when the pin
voltage is High and 0 when Low.
The value read out is 0 when input is disabled (PxIENy = 0).
Writing operations to the read-only PxINy is disabled.
Px Port Output Data Registers (Px_OUT)
Register name Address
Bit
Name
Function
Setting
Init. R/W
Remarks
Px Port Output
Data Register
(Px_OUT)
0x5201
0x5211
(8 bits)
D7–0 PxOUT[7:0] Px[7:0] port output data
1 1 (H)
0 0 (L)
0
R/W
Note: P1OUT[3:0] only are available for the P1 ports. Other bits are reserved and always read as 0.
D[7:0]
PxOUT[7:0]: Px[7:0] Port Output Data Bits
Sets the data to be output from the port pin.
1 (R/W): High level
0 (R/W): Low level (default)
PxOUTy corresponds directly to the Pxy pins. The data written will be output unchanged from the port
pins when output is enabled (PxOENy = 1). The port pin will be High when the data bit is set to 1 and
Low when set to 0.
Port data can also be written when output is disabled (PxOENy = 0) (the pin status is unaffected).
Px Port Output Enable Registers (Px_OEN)
Register name Address
Bit
Name
Function
Setting
Init. R/W
Remarks
Px Port
Output Enable
Register
(Px_OEN)
0x5202
0x5212
(8 bits)
D7–0 PxOEN[7:0] Px[7:0] port output enable
1 Enable
0 Disable
0
R/W
Note: P1OEN[3:0] only are available for the P1 ports. Other bits are reserved and always read as 0.
D[7:0]
PxOEN[7:0]: Px[7:0] Port Output Enable Bits
Enables or disables port outputs.
1 (R/W): Enabled
0 (R/W): Disabled (default)
PxOENy is the output enable bit that corresponds directly to Pxy port. Setting to 1 enables output and
the data set in PxOUTy is output from the port pin. Output is disabled when PxOENy is set to 0, and the
port pin is set into high-impedance status. The peripheral module determines whether output is enabled
or disabled when the port is used for a peripheral module function.
Refer to Table 10.3.1 for more information on input/output status for ports, including settings other than
for the PxOEN register.
Px Port Pull-up Control Registers (Px_PU)
Register name Address
Bit
Name
Function
Setting
Init. R/W
Remarks
Px Port Pull-up
Control Register
(Px_PU)
0x5203
0x5213
(8 bits)
D7–0 PxPU[7:0]
Px[7:0] port pull-up enable
1 Enable
0 Disable
1
(0xff)
R/W
Note: P1PU[3:0] only are available for the P1 ports. Other bits are reserved and always read as 0.
D[7:0]
PxPU[7:0]: Px[7:0] Port Pull-up Enable Bits
Enables or disables the pull-up resistor included in each port.
1 (R/W): Enabled (default)
0 (R/W): Disabled