MOTOROLA
KEYPAD PORT
MMC2001
14-4
REFERENCE MANUAL
Due to the logic function of the release and depress synchronizer chains, it is possi-
ble to see the re-assertion of a status flag (KPKD or KPKR) if it is cleared by software
prior to the system exiting the state it represents. Software should ensure that the
interrupt for a key release event is masked until it has entered the key pressed state
(and vice versa) unless this activity is desired, as might be the case when a repeated
interrupt is to be generated. The synchronizer chains are capable of being initialized
to detect repeated key presses or releases. If they are not initialized when the corre-
sponding event flag is cleared, false interrupts may be generated for depress (or
release) events shorter than the length of the corresponding chain.
The KPSR register is byte or halfword addressable.
Figure 14-3 Keypad Status Register
KRIE — Key Release Interrupt Enable
0 =
No interrupt request is generated when KPKR is set
1 =
An interrupt request is generated when KPKR is set
KDIE — Key Depress Interrupt Enable
0 =
No interrupt request is generated when KPKD is set
1 =
An interrupt request is generated when KPKD is set
KRSS — Key Release Synchronizer Set
The key release synchronizer is set by writing a logic one into this bit. Reads return a
value of zero.
KDSC — Key Depress Synchronizer Clear
The key depress synchronizer is cleared by writing a logic one into this bit. Reads
return a value of zero.
KPKR — Keypad Key Release
0 =
No key release detected
1 =
All keys have been released
KPKR is cleared by writing a logic one into this bit.
KPKD — Keypad Key Depress
0 =
No key presses detected
1 =
A key has been depressed
KPKD is cleared by writing a logic one into this bit.
KPSR — Keypad Status Register
10003002
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
R
0
0
0
0
0
0
KRIE
KDIE
0
0
0
0
0
0
KPKR KPKD
W
KRSS KDSC
RESET:
0
0
0
0
0
0
Freescale Semiconductor,
I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc.
..