12 i/O PORTS
S1C63003/004/008/016 TeChniCal Manual
Seiko epson Corporation
12-7
(Rev. 1.1)
Address
Register name R/W Default
Setting/data
Function
FF3EH
(
*
6)
D3
SiP13
R/W
0
1 Enable
0 Disable
P13(KEY13) interrupt select register
D2
SiP12
R/W
0
1 Enable
0 Disable
P12(KEY12) interrupt select register
D1
SiP11
R/W
0
1 Enable
0 Disable
P11(KEY11) interrupt select register
D0
SiP10
R/W
0
1 Enable
0 Disable
P10(KEY10) interrupt select register
FF3FH
(
*
6)
D3
PCP13
R/W
1
1
↓
(falling edge)
0
↑
(rising edge)
P13(KEY13) interrupt polarity select register
D2
PCP12
R/W
1
1
↓
(falling edge)
0
↑
(rising edge)
P12(KEY12) interrupt polarity select register
D1
PCP11
R/W
1
1
↓
(falling edge)
0
↑
(rising edge)
P11(KEY11) interrupt polarity select register
D0
PCP10
R/W
1
1
↓
(falling edge)
0
↑
(rising edge)
P10(KEY10) interrupt polarity select register
*
1 Initial value at initial reset
*
2 Not set in the circuit
*
3 Constantly "0" when being read
*
4 Unused in the S1C63003/004/008
*
5 Unused in the S1C63003/004
*
6 Unused in the S1C63003
P0[3:0]: P0 i/O port data register (FF20h)
P1[3:0]: P1 i/O port data register (FF24h)
P2[3:0]: P2 i/O port data register (FF28h)
P3[3:0]: P3 i/O port data register (FF2Ch) – S1C63004/008/016
P4[3:0]: P4 i/O port data register (FF30h) – S1C63008/016
P5[3:0]: P5 i/O port data register (FF34h)
I/O port data can be read and output data can be set through these registers.
When writing data
When "1" is written: High level
When "0" is written: Low level
When an I/O port is placed into output mode, the written data is output unchanged from the I/O port terminal.
When "1" is written as port data, the port terminal goes high (V
DD
), and when "0" is written, the terminal goes
low (V
SS
). Port data can be written also in the input mode.
When reading data
When "1" is read: High level
When "0" is read: Low level
When the I/O port is placed into input mode, the voltage level being input to the port terminal can be read out.
When the terminal voltage is high (V
DD
), the port data that can be read is "1," and when the terminal voltage is
low (V
SS
) the read data is "0." When the pull-down resistor option has been selected and the PULxx register is set
to "1," the built-in pull-down resistor goes on during input mode, so that the I/O port terminal is pulled down.
When the I/O port is placed into output mode, the register value is read. Therefore, when using the data register
of a port that is not used for signal input/output as a general-purpose register, set the port to output mode.
At initial reset, these registers are set to "1."
The data register of the port, which is set for an input/output of the serial interface or R/F converter or a special
output, becomes a general-purpose register that does not affect the input/output status.
Note: When I/O ports set in input mode is changed from high to low by the pull-down resistor, the fall of
the waveform is delayed on account of the time constant of the pull-down resistor and input gate
capacitance. Hence, when fetching input data, 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 × C × R
C: terminal capacitance 15 pF + parasitic capacitance ? pF
R: pull-down resistance 500 k
Ω
(Max.)