26
EPSON
S1C6N3B0 TECHNICAL MANUAL
CHAPTER 4: PERIPHERAL CIARCUITS AND OPERATION (I/O Ports)
(3) Pull-up resistor
Whether or not the I/O port terminal will use built-in pull-up resistor which is turned on during
input mode can be selected.
(4) Interrupt port
When the P01 or the P03 is set as an input-only port, the port can generate an input interrupt. This
function cannot be selected for the I/O ports and the serial interface ports.
(5) Noise rejection circuit
The input interrupt circuit contains a noise rejection circuit to prevent interrupts form occurring
through noise. The mask option enables selection of the noise rejection circuit for each terminals.
When the noise rejection circuit is used, pulses shorter than 0.5 cycles of the sampling clock are
rejected as noise. To be certain interrupts are generated the input signal must have at least 1.5 cycles of
low width. Be aware that pulses between 0.5 and 1.5 cycles may or may not be regarded as noise
depending on the input timing.
Sampling clock
Input signal
Interrupt
Sampling clock frequency: S1C6N3B0
S1C6A3B0
fOSC/8
fDVIN/8
4 kHz when fOSC = 32 kHz
fDVIN: fOSC/12 (ceramic oscillation) or fOSC/6 (CR oscillation)
Interrupt occurs
Rejected as noise
Fig. 4.5.2.1 Noise rejection
4.5.3 I/O control register and I/O mode
Input or output mode can be set for the I/O ports P00–P03 by writing data to the I/O control register
IOC.
To set the input mode, write "0" to the I/O control register (IOC). When the I/O ports are set to the input
mode, the terminals become high impedance and they work as input ports. However, when the pull-up
explained in the following section has been set by software, the input line is pulled up only during this
input mode.
The output mode is set when "1" is written to the I/O control register (IOC). When the I/O ports are set
to the output mode, thet work as output ports and output a high signal (VDD) when the port output data
is "1", and a low signal (VSS) when the port output data is "0". If perform the read out in each mode; when
output mode, the register value is read out, and when input mode, the port value is read out.
At initial reset, the I/O control register is set to "0", and the I/O ports enter the input mode.
The ports that are set for the serial interface or set as input only cannot be controlled by the IOC register.
4.5.4 Control of pull-up
Pull-up resistors can be added to the I/O port and input-only port by mask option.
The pull-up resistors of the I/O port turn on when "1" is written to the pull-up control register PLON and
the ports are pulled up. When "0" is written, the ports are not pulled-up. At initial reset, the pull-up
control register is set to "0". However, the ports will not be pulled up even if the PLON is set to "1" when
the I/O ports are set in the output mode.
The pull-up resistor of the input-only port is always turned on regardless of the PLON setting.