
44
EPSON
S1C8F626 TECHNICAL MANUAL
5 PERIPHERAL CIRCUITS AND THEIR OPERATION (I/O Ports)
5.6.4 Pull-up control
The S1C8F626 I/O ports have a built-in pull-up
resistor and the resistor in each port is enabled or
disabled with software.
The pull-up resistor becomes effective by writing
"1" to the pull-up control register PULPxx that
corresponds to each port, and the Pxx terminal is
pulled up during the input mode. When "0" has
been written, no pull-up is done.
When the port is set in the output mode, the setting
of the pull-up control register becomes invalid (no
pull-up is done during output).
At initial reset, the pull-up control registers are set
to "1" (pulled up).
When changing the port terminal from LOW level
to HIGH with the built-in pull-up resistor, a delay
in the waveform rise time will occur depending on
the time constant of the pull-up resistor and the
load capacitance of the terminal. It is necessary to
set an appropriate wait time for introduction of an
I/O port. Make this wait time the amount of time
or more calculated by the following expression.
Wait time = RIN x (CIN + load capacitance on the
board) x 1.6 [sec]
RIN: Pull up resistance Max. value
CIN: Terminal capacitance Max. value
For unused ports, enable pull-up using the pull-up
control registers.
5.6.5 Special output
Besides general purpose DC input/output, I/O
ports P14–P17 can also be assigned special output
functions in software as shown in Table 5.6.5.1.
Table 5.6.5.1 Special output ports
Output port
P14
P15
P16
P17
Special output
TOUT0/TOUT1 output
TOUT2/TOUT3 output
FOUT output
TOUT2/TOUT3 output
When using P14–P17 as a special output port, write
"1" to the corresponding I/O control register
(IOC14–IOC17) to set the port to the output mode.
■ TOUT output (P14, P15)
In order for the S1C8F626 to provide clock signal to
an external device, the terminals P14 and P15 can
be used to output a TOUTx signal (clock output by
the programmable timer).
The output control for the TOUTx signals (x = 0–3)
is done by the registers PTOUTx. When PTOUTx is
set to "1", the TOUTx signal is output from the
corresponding port terminal, when "0" is set, the
port is set for DC output. When PTOUTx is "1",
settings of the I/O control register IOC14/IOC15
and data register P14D/P15D become invalid.
The TOUT0–TOUT3 signals are generated from the
underflow and compare-match signals of the
programmable timers 0–3.
With respect to frequency control, see "5.10 Pro-
grammable Timer".
Since the TOUTx signals are generated asynchro-
nously from the registers PTOUTx, when the
signals are turned ON or OFF by the register
settings, a hazard of a 1/2 cycle or less is generated.
Figure 5.6.5.1 shows the output waveform of the
TOUT signal.
PTOUTx
TOUTx output
(P14/15)
01
Fig. 5.6.5.1 Output waveform of TOUT signal
Note: If PTOUT0 and PTOUT1 are set to "1" at the
same time, PTOUT1 is effective. Similarly, if
PTOUT2 and PTOUT3 are set to "1",
PTOUT3 is effective.