
I-42
EPSON
S1C62740 TECHNICAL HARDWARE
CHAPTER 4: PERIPHERAL CIRCUITS AND OPERATION (I/O Ports)
When PUP register is set to "1", the built-in pull up resistor goes
ON during input mode, so that the I/O port terminal is pulled up.
Internal pull up resistors are only ON during input mode, but the
gate floating has not occur even during output mode.
When the serial input/output function is selected for P20–P23
ports, registers P20–P23 can be used as a four bits general register
having both read and write function, and data of this register
exerts no affect on input/output signal.
Note:
When in the input mode, I/O ports are changed from low to high by pull up
resistor, the rise of the waveform is delayed on account of the time
constant of the pull up resistor and input gate capacitance. Hence, when
fetching input ports, set an appropriate wait time.
Particular care needs to be taken of the key scan during key matrix
configuration.
Make this waiting time the amount of time or more calculated by the
following expression.
10 x C x R
C: terminal capacitance 5 pF + parasitic capacitance ? pF
R: pull up resistance 300 k
The input and output modes of the I/O ports can be set with these
registers.
When "1" is written: Output mode
When "0" is written: Input mode
Reading: Valid
The input and output modes of the I/O ports are set in units of
four bits. IOC0, IOC1 and IOC2 set the mode for P00–P03, P10–P13
and P20–P23, respectively.
Writing "1" to the I/O control register makes the corresponding I/O
port enter the output mode, and writing "0" induces the input
mode.
At initial reset, these registers are set to "0", so the I/O ports are in
the input mode.
When the serial input/output function is selected for P20–P23
ports, register IOC2 can be used as a one bits general register
having both read and write function, and data of this register
exerts no affect on input/output control.
IOC0, IOC1, IOC2:
I/O control register
(D6HD0–D2)