12 i/O PORTS
S1C63003/004/008/016 TeChniCal Manual
Seiko epson Corporation
12-9
(Rev. 1.1)
SiP0[3:0]: P0 port interrupt select register (FF3Ch)
SiP1[3:0]: P1 port interrupt select register (FF3eh) – S1C63004/008/016
Selects the ports used for the key input interrupt from P00–P03 and P10–P13.
When "1" is written: Interrupt enable
When "0" is written: Interrupt disable
Reading: Valid
By writing "1" to an interrupt select register (SIP0[3:0], SIP1[3:0]), the corresponding I/O port (P00–P03, P10–
P13) is enabled to generate interrupts. When "0" is written, the I/O port does not affect the interrupt generation.
Reactivating from SLEEP status can only be done by generation of a key input interrupt factor. Therefore when
using the SLEEP function, it is necessary to set the interrupt select register (SIPxx = "1") of the port to be used
for releasing SLEEP status before executing the SLP instruction.
At initial reset, these registers are set to "0."
PCP0[3:0]: P0 port interrupt polarity select register (FF3Dh)
PCP1[3:0]: P1 port interrupt polarity select register (FF3Fh) – S1C63004/008/016
Sets the interrupt conditions.
When "1" is written: Falling edge
When "0" is written: Rising edge
Reading: Valid
When "1" is written to an interrupt polarity select register (PCP0[3:0], PCP1[3:0]), the corresponding I/O port
(P00–P03, P10–P13) generates an interrupt at the falling edge of the input signal. When "0" is written, the I/O
port generates an interrupt at the rising edge of the input signal. At initial reset, these registers are set to "1."
nRSP0[1:0]: Key input interrupt 0–3 noise reject frequency select register (FF11h•D[1:0])
nRSP1[1:0]: Key input interrupt 4–7 noise reject frequency select register (FF11h•D[3:2])
*
*
S1C63004/008/016
Selects the noise reject frequency for the key input interrupts.
7.2 Setting up noise rejector
Table 12.
NRSP0[1:0]/NRSP1[1:0]
Noise reject frequency
Reject pulse width
3
f
OSC1
/ 256 (128 Hz)
7.8 msec
2
f
OSC1
/ 64 (512 Hz)
2.0 msec
1
f
OSC1
/ 16 (2 kHz)
0.5 msec
0
Off (bypassed)
–
NRSP0[1:0] and NRSP1[1:0] are the noise reject frequency select registers that correspond to the key input inter-
rupts 0–3 (P00–P03) and the key input interrupts 4–7 (P10–P13), respectively. At initial reset, these registers are
set to "0."
Precautions
12.8
• When an I/O ports 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.)
• Be sure to turn the noise rejector off before executing the SLP instruction.