lm8328tmx National Semiconductor Corporation, lm8328tmx Datasheet - Page 14

no-image

lm8328tmx

Manufacturer Part Number
lm8328tmx
Description
Mobile I/o Companion Supporting Keyscan, I/o Expansion Pwm, And Access.bus Host Interface
Manufacturer
National Semiconductor Corporation
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
LM8328TMX
Manufacturer:
NS/国半
Quantity:
20 000
Part Number:
lm8328tmx/NOPB
Manufacturer:
Texas Instruments
Quantity:
10 000
www.national.com
11.3 KEYSCAN PROCESS
The LM8328 keyscan functionality is based on a specific
scanning procedure performed in a 4ms interval. On each
scan all assigned key matrix pins are evaluated for state
changes.
In case a key event has been identified, the event is stored in
the key event FIFO, accessible via the EVTCODE register. A
key event can either be a key press or a key release. In ad-
dition, key presses are also stored in the KBDCODE[3:0]
registers. As soon as the EVTCODE FIFO includes a event,
11.4 READING KEYSCAN STATUS BY THE HOST
In order to keep track of the keyscan status, the host either
needs to regularly poll the EVTCODE register or needs to re-
act on the Interrupt signaled by the IRQN/KPY11/PWM2 pin,
in case the ball is configured for interrupt functionality. (See
Section 13.4.1 GPIO Feature
Figure 9
the keyboard events from the LM8328 and how they influence
the interrupt event registers. The example is based on the
assumption that the LM8328 has indicated the keyboard
event by the IRQN/KPY11/PWM2 pin.
Since the interrupt pin has various sources, the host first
checks the IRQST register for the interrupt source. If KBDIRQ
is set, the host can check the KBDMIS register to define the
exact interrupt source. KBDMIS contains the masked status
of KBDRIS and reflects the source for raising the interrupt pin.
The interrupt mask is defined by KBDMSK. The complete
status of all pending keyboard interrupts is available in the raw
interrupt register KBDRIS.
After evaluating the interrupt source the host starts reading
the EVTCODE or KBDCODE register. In this example the
gives an example on which registers to read to get
Mapping).
FIGURE 8. Example Keyscan Operation for
1 Key Press and Release
14
the device sets the RAW keyboard event interrupt REVTINT.
The RSINT interrupt is set anytime the keyboard status has
changed.
Depending on the interrupt masking for the keyboard events
(KBDMSK) and the masked interrupt handling (KBDMIS), the
pin IRQN/KPY11/PWM2 will follow the IRQST.KBDIRQ sta-
tus, which is set as soon as one interrupt in KBDRIS is set.
Figure 8
which registers are affected.
host first reads the KBDCODE to get possible key press
events and afterwards reads the complete event list by read-
ing the EVTCODE register until all events are captured (0x7F
indicates end of buffer).
Reading KBDCODE clears the RSINT interrupt bit if all key-
boards events are emptied. In the same way, REVTINT is
cleared in case the EVTCODE FIFO reaches its empty state
on read.
The event buffer content and the REVTINT and RELINT (lost
event) interrupt bits are also cleared if the KBDIC.EVTIC bit
is set.
Interrupt bits in the masked interrupt register KBDMIS follow
the masked KBDRIS status.
In order to support efficient Multi-byte reads from EVTCODE,
the autoincrement feature is turned off for this register. There-
fore the host can continuously read the complete EVTCODE
buffer by sending one command.
shows the basic flow of a scanning process and
30124108

Related parts for lm8328tmx