9 i/O PORTS (P)
S1C17624/604/622/602/621 TeChniCal Manual
Seiko epson Corporation
9-11
P
x
Port Chattering Filter Control Registers (P
x
_ChaT)
Register name address
Bit
name
Function
Setting
init. R/W
Remarks
P
x
Port
Chattering
Filter Control
Register
(P
x
_ChaT)
0x5208
0x5218
(8 bits)
D7
–
reserved
–
–
–
0 when being read.
D6–4 P
x
CF2[2:0] P
x
[7:4] chattering filter time select
P
x
CF2[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 P
x
CF1[2:0] P
x
[3:0] chattering filter time select
P
x
CF1[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: The P
x
CHAT registers are available only for P0 and P1 ports.
D7
Reserved
D[6:4]
P
x
CF2[2:0]: P
x
[7:4] Chattering Filter Time Select Bits
Configures the chattering filter circuit for the P
x
[7:4] ports.
D3
Reserved
D[2:0]
P
x
CF1[2:0]: P
x
[3:0] Chattering Filter Time Select Bits
Configures the chattering filter circuit for the P
x
[3:0] ports.
The P0 and P1 ports include a chattering filter circuit for key entry that can be disabled or enabled
with a check time specified individually for the four P
x
[3:0] and P
x
[7:4] ports using P
x
CF1[2:0] and
P
x
CF2[2:0], respectively.
9.2 Chattering Filter Function Settings
Table 9.
P
x
CF1[2:0]/P
x
CF2[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 a minimum input time of the check time and a maximum
input time of twice the check time.
• The P
x
port interrupt must be disabled before setting the P
x
_CHAT register. Setting the reg-
ister while the interrupt is enabled may generate inadvertent P
x
interrupt. Also the chattering
filter circuit requires a maximum of twice the check time for stabilizing the operation status.
Before enabling the interrupt, make sure that the stabilization time has elapsed.