Epson S1C17624 Technical Manual page 93

Cmos 16-bit single chip microcontroller
Table of Contents

Advertisement

*2: Available only for S1C17624, *3: Available only for S1C17624/604, *4: Available only for S1C17624/622
*5: P43 can only be used as an output port. For how to configure P43, see the P43MUX/P40_43PMUX register description.
At initial reset, each I/O port pin (Pxy) is initialized for the default function ("Pin function 1" in Table 9.2.1).
For information on functions other than the I/O ports, see the descriptions of the peripheral modules indicated in
parentheses. The sections below describe port functions with the pins set as general-purpose I/O ports.
9.3
Data input/Output
Data input/output control
The I/O ports allow selection of the data input/output direction for each bit using PxOENy/Px_OEN register and
PxIENy/Px_IEN register. PxOENy enables and disables data output, while PxIENy enables and disables data
input.
PxOeny
Pxieny
output control
input control
0
0
1
1
0
0
The input/output direction of ports with a peripheral module function selected is controlled by the peripheral
module. PxOENy and PxIENy settings are ignored.
Data input
To input the port pin status and read out the value, enable input by setting PxIENy to 1 (default).
To input an external signal, PxOENy should also be set to 0 (default). The I/O port is placed into high-imped-
ance status and it functions as an input port (input mode). The port is pulled up if pull-up is enabled by PxPUy/
Px_PU register.
In input mode, the input pin status can be read out directly from PxINy/Px_IN register. The value read will be 1
when the input pin is at High (V
The port pin status is always input when PxIENy is 1, even if output is enabled (PxOENy = 1) (output mode). In
this case, the value actually output from the port can be read out from PxINy.
When PxIENy is set to 0, input is disabled, and 0 will be read out from PxINy.
Data output
To output data from the port pin, enable output by setting PxOENy to 1 (set to output mode). The I/O port then
functions as an output port, and the value set in the PxOUTy/Px_OUT register is output from the port pin. The
port pin outputs High (V
port will not be pulled up in output mode, even if pull-up is enabled by PxPUy.
Writing to PxOUTy is possible without affecting pin status, even in input mode.
note: P43 can only be used as an output port. For how to configure P43, see the P43MUX/P40_43PMUX
register description.
S1C17624/604/622/602/621 TeChniCal Manual
Table 9.
3.1 Data Input/Output Status
PxPuy
pull-up control
1
0
1
1
0
1 or 0
1
1 or 0
0
0
0
1
) level and 0 when it is at Low (V
DD
) level when PxOUTy is set to 1 and Low (V
DD
Seiko epson Corporation
Functions as an input port (pull-up off).
The port pin (external input signal) value can be read out from
PxINy (input data). Output is disabled.
Functions as an input port (pull-up on). (Default)
The port pin (external input signal) value can be read out from
PxINy (input data). Output is disabled.
Functions as an output port (pull-up off).
Input is disabled. The value read from PxINy (input data) is 0.
Functions as an output port (pull-up off).
Input is also enabled. The port pin value (output value) can be
read out from PxINy (input data).
The pin is placed into high-impedance status (pull-up off).
Output and input are both disabled. The value read from PxINy
(input data) is 0.
The pin is placed into high-impedance status (pull-up on).
Output and input are both disabled. The value read from PxINy
(input data) is 0.
) level.
SS
SS
9 i/O PORTS (P)
Port status
) level when set to 0. Note that the
9-3

Advertisement

Table of Contents
loading

This manual is also suitable for:

S1c17604S1c17622S1c17602S1c17621

Table of Contents