I/O Control Registers And Input/Output Mode; Input Interface Level; Pull-Down During Input Mode; Key Input Interrupt Function - Epson S1C63003 Technical Manual

Cmos 4-bit single chip microcontroller
Table of Contents

Advertisement

12.3

i/O Control Registers and input/Output Mode

The I/O ports can be placed into input or output mode by writing data to the corresponding I/O control registers
IOCxx.
To set a port to input mode, write "0" to the I/O control register. When an I/O port is set to input mode, it becomes
high impedance status and works as an input port.
However, when the pull-down explained in Section 12.5 has been enabled by software, the input line is pulled down
only during this input mode.
To set a port to output mode, write "1" to the I/O control register. When an I/O port is set to output mode, it works as
an output port. The port outputs a high level (V
port output data is "0." The I/O ports allow software to read data even in output mode. In this case, the data register
value is read out.
At initial reset, the I/O control registers are set to "0," and the I/O ports enter input mode.
When the peripheral input/output or special output function is selected (see Table 12.1.1), the input/output direction
is controlled by the hardware. In this case, I/O control register settings are ineffective.
12.4

input interface level

The I/O ports P00–P03 and P10–P13 allow software to select an input interface level. When the input interface level
select register SMTxx is set to "0," the corresponding port is configured with a CMOS level input interface. When
SMTxx is set to "1," the port is configured with a CMOS Schmitt level input interface. At initial reset, all the ports
are configured with a CMOS Schmitt level interface.
The input interface level select register of the port that is set for a peripheral input functions the same as the I/O
port.
The input interface level of the P2 to P5 ports are fixed at a CMOS Schmitt level.
12.5

Pull-down During input Mode

A pull-down resistor that activates during the input mode can be built into the I/O ports of the S1C63003/004/008/016
by mask option. The pull-down resistor becomes effective by writing "1" to the pull-down control register PULxx
that corresponds to each port, and the input line is pulled down during input mode. When "0" is written to PULxx or
in output mode, the port will not be pulled down.
At initial reset, the pull-down control registers are set to "1."
The pull-down control registers of the ports in which the pull-down resistor is disconnected by mask option can be
used as general purpose registers.
Even if the pull-down resistor has been connected, the pull-down control register of the port that is set for a peripheral
output, R/F converter input/output or output special output (see Table 12.1.1) can be used as a general purpose register
that does not affect the pull-down control. The pull-down control register of the port that is set for a peripheral input
(except for the R/F converter) functions the same as the I/O port.
12.6

Key input interrupt Function

Eight bits of the I/O ports (P00–P03 and P10–P13, four bits of P00–P03 in the S1C63003) provide the interrupt
function. The conditions for generating an interrupt can be set with software. Further, whether to mask the interrupt
function can be selected with software. Figure 12.6.1 shows the configuration of the key input interrupt circuit.
S1C63003/004/008/016 TeChniCal Manual
(Rev. 1.1)
) when the port output data is "1," and a low level (V
DD
Seiko epson Corporation
12 i/O PORTS
) when the
SS
12-3

Advertisement

Table of Contents
loading

This manual is also suitable for:

S1c63004S1c63008S1c63016

Table of Contents