LM8322EVALKIT National Semiconductor, LM8322EVALKIT Datasheet - Page 16

no-image

LM8322EVALKIT

Manufacturer Part Number
LM8322EVALKIT
Description
BOARD EVALUATION LM8322
Manufacturer
National Semiconductor
Datasheet

Specifications of LM8322EVALKIT

Main Purpose
Interface, Special Purpose
Embedded
No
Utilized Ic / Part
LM8322
Primary Attributes
Mobile I/O Companion with Key-Scan, I/O Expansion, PWM, Access.bus Host
Secondary Attributes
Board has MCU for USB to PC GUI
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
www.national.com
In the example above, three keys (Up, Down, and Select) are
connected as SF keys (connected directly to ground). Al-
though they could have shared the KP-Xx inputs used with
the scanned keys, the advantage of placing them on their own
KP-Xx inputs is that it allows scanning the keypad while an
SF key is pressed. If an SF key shares a KP-Xx input with any
scanned keys, pressing the SF key prevents the LM8322 from
reading the scanned keys.
The SET_KEY_SIZE command includes a data byte that
specifies the keypad size. The upper 4 bits of the data byte
specify the number of KP-Xx inputs, and the lower 4 bits
specify the number of KP-Yx outputs. The minimum number
of inputs and outputs is 3. Therefore, the minimum keypad
configuration supports 3 × 3 + 3 SF keys (total of 12 keys).
The maximum number of KP-Xx inputs is 8, and the maximum
number of KP-Yx pins is 12. All KP-Xx and KP-Yx pins not
used for the keyboard interface can be used for general-pur-
pose I/O.
For the example shown in Figure 10, the SET_KEY_SIZE
command would specify 8 KP-Xx inputs and 4 KP-Yx outputs.
Any pins used as GPIO ports must be configured after the
peripheral configuration has been initialized with the
WRITE_CFG command (0x81) and the keypad configuration
WRITE_PORT_SEL
0
0
0
1
1
WRITE_PORT_STATE
0
1
1
0
1
FIGURE 10. Keypad Interface Example
TABLE 7. GPIO Port Control Bits
WRITE_PULL_DOWN
16
13.0 General-Purpose I/O Ports
Any unused KP-Xx and KP-Yx pins may be used as general-
purpose I/O (GPIO) port pins. The WRITE_PORT_SEL
(0x85) command selects the port direction, in which a clear
bit in the parameter to the command selects the input direction
and a set bit selects the output direction.
The WRITE_PORT_STATE (0x86) command selects either
the port level when configured as output (by the
WRITE_PORT_SEL command) or when configured as an in-
put selects between a high-impedance input or an input with
a pullup or pulldown device. The selection between pullup or
pulldown devices is controlled by the parameter bytes to the
WRITE_PULL_DOWN (0x84) command. Clear bits in the pa-
rameter bytes select pullup devices, while set bits select
pulldown devices.
Table 7 shows the GPIO port configurations selected by the
bits in the WRITE_PORT_SEL, WRITE_PORT_STATE, and
WRITE_PULL_DOWN command parameters.
has been initialized with the SET_KEY_SIZE command
(0x90). The default keypad configuration after reset is a 3 × 3
x
0
1
x
x
High-Impedance Input
Input with Pullup Device
Input with Pulldown Device
Output, Drive Low
Output, Drive High
Description
30013610

Related parts for LM8322EVALKIT