9 i/O PORTS (P)
9-8
Seiko epson Corporation
S1C17153 TeChniCal Manual
(Rev. 1.0)
P0IF
y
is reset by writing 1.
notes
: • The P port module interrupt flag P0IF
y
must be reset in the interrupt handler routine after a
port interrupt has occurred to prevent recurring interrupts.
• To prevent generating unnecessary interrupts, reset the relevant P0IF
y
before enabling in-
terrupts for the required port using P0IE
y
/P0_IMSK register.
P0 Port Chattering Filter Control Register (P0_ChaT)
Register name address
Bit
name
Function
Setting
init. R/W
Remarks
P0 Port
Chattering
Filter Control
Register
(P0_ChaT)
0x5208
(8 bits)
D7
–
reserved
–
–
–
0 when being read.
D6–4
P0CF2[2:0]
P0[7:4] chattering filter time select
P0CF2[2:0]
Filter time
0x0 R/W
0x7
0x6
0x5
0x4
0x3
0x2
0x1
0x0
16384/f
PCLK
8192/f
PCLK
4096/f
PCLK
2048/f
PCLK
1024/f
PCLK
512/f
PCLK
256/f
PCLK
None
D3
–
reserved
–
–
–
0 when being read.
D2–0
P0CF1[2:0]
P0[3:0] chattering filter time select
P0CF1[2:0]
Filter time
0x0 R/W
0x7
0x6
0x5
0x4
0x3
0x2
0x1
0x0
16384/f
PCLK
8192/f
PCLK
4096/f
PCLK
2048/f
PCLK
1024/f
PCLK
512/f
PCLK
256/f
PCLK
None
note
: This register is available for the P0 ports.
D7
Reserved
D[6:4]
P0CF2[2:0]: P0[7:4] Chattering Filter Time Select Bits
Configures the chattering filter circuit for the P0[7:4] ports.
D3
Reserved
D[2:0]
P0CF1[2:0]: P0[3:0] Chattering Filter Time Select Bits
Configures the chattering filter circuit for the P0[3:0] ports.
The P0 ports include a chattering filter circuit for key entry that can be disabled or enabled with a check
time specified individually for the four P0[3:0] and P0[7:4] ports using P0CF1[2:0] and P0CF2[2:0],
respectively.
8.2 Chattering Filter Function Settings
Table 9.
P0CF1[2:0]/P0CF2[2:0]
Check time
*
0x7
16384/f
PCLK
(8 ms)
0x6
8192/f
PCLK
(4 ms)
0x5
4096/f
PCLK
(2 ms)
0x4
2048/f
PCLK
(1 ms)
0x3
1024/f
PCLK
(512 µs)
0x2
512/f
PCLK
(256 µs)
0x1
256/f
PCLK
(128 µs)
0x0
No check time (off)
(Default: 0x0,
*
when PCLK = 2 MHz)
notes
: • An unexpected interrupt may occur after SLEEP status is canceled if the slp instruction is
executed while the chattering filter function is enabled. The chattering filter must be disabled
before placing the CPU into SLEEP status.
• The chattering filter check time refers to the maximum pulse width that can be filtered. Gen-
erating an input interrupt requires an input time of twice the check time.