Keypad Data Direction Register (Kddr); Keypad Data Register (Kpdr); Keypad Data Direction Register; Keypad Data Register - Motorola Freescale Semiconductor M-Core MMC2001 Reference Manual

Table of Contents

Advertisement

14.3.3 Keypad Data Direction Register (KDDR)

The bits in the keypad data direction register (KDDR) control the direction of the key-
pad port pins. The upper eight bits in the register affect the pins designated as col-
umn strobes, while the lower eight bits affect the row sense pins. Setting any bit in this
register configures the corresponding pin as an output. Clearing any bit in this regis-
ter configures the corresponding port pin as an input. For bits 7 to 0, an internal pull-
up is enabled if the corresponding bit is cleared. This register is cleared by reset, con-
figuring all pins as inputs.
The KDDR register is byte or halfword addressable.
KDDR — Keypad Data Direction Register
15
14
13
12
R
KCDD7 KCDD6 KCDD5 KCDD4 KCDD3 KCDD2 KCDD1 KCDD0 KRDD7 KRDD6 KRDD5 KRDD4 KRDD3 KRDD2 KRDD1 KRDD0
W
RESET:
0
0
0
0
KCDDx — Keypad Column x Data Direction
0 = COLx pin is configured as input.
1 = COLx pin is configured as output.
KRDDx — Keypad Row x Data Direction
0 = ROWx pin is configured as input.
1 = ROWx pin is configured as output.

14.3.4 Keypad Data Register (KPDR)

The 16-bit keypad data register is used to access the column and row data. Data writ-
ten to this register is stored in an internal latch, and for each pin configured as an out-
put, the stored data is driven onto the pin. A read of this register returns the value on
the pin for those bits configured as inputs. Otherwise, the value read is the value
stored in the register.
The KPDR register is byte or halfword addressable.
KPDR — Keypad Data Register
15
14
13
12
R
KCD7 KCD6 KCD5 KCD4 KCD3 KCD2 KCD1 KCD0 KRD7 KRD6 KRD5 KRD4 KRD3 KRD2 KRD1 KRD0
W
RESET:
*
*
*
*
* Since pins default to inputs, reset value is determined by the logic level present on the pins at reset.
MMC2001
REFERENCE MANUAL
All manuals and user guides at all-guides.com
Freescale Semiconductor, Inc.
11
10
9
0
0
0
Figure 14-4 Keypad Data Direction Register
11
10
9
*
*
*
Figure 14-5 Keypad Data Register
KEYPAD PORT
For More Information On This Product,
Go to: www.freescale.com
8
7
6
5
0
0
0
0
8
7
6
5
*
*
*
*
10003004
4
3
2
1
0
0
0
0
10003006
4
3
2
1
*
*
*
*
MOTOROLA
0
0
0
*
14-5

Advertisement

Table of Contents
loading

Table of Contents