ADP5587_1 AD [Analog Devices], ADP5587_1 Datasheet - Page 11

no-image

ADP5587_1

Manufacturer Part Number
ADP5587_1
Description
Mobile I/O Expander and QWERTY Keypad Controller
Manufacturer
AD [Analog Devices]
Datasheet
Keypad Lock/Unlock Feature
The ADP5587 has a locking feature that allows the user to lock
the keypad or GPIs (configured to be part of the event table).
When enabled, the keypad lock can prevent generation of key
event interrupts and prevent key events from being recorded
in the key event table. This feature comprises the Unlock Key 1
and Unlock Key 2 registers (Register 0x0F and Register 0x10,
respectively), the keypad lock interrupt mask and keypad
unlock timers (Register 0x0E), and the LCK1, LCK2, and
keylock enable (K_LCK_EN) bits (Register 0x03).
The unlock keys can be programmed with any value of the keys
in the keypad matrix or any GPI event values that are part of the
key event table. When the keypad lock interrupt mask timer is
enabled, the user must press two specific keys before a keylock
interrupt is generated or keypad events are recorded. After the
keypad is locked (set Bit 6, Register 0x03, to enable the lock),
the first time that the user presses any key, a key event interrupt
is generated. No additional interrupt is generated unless both
unlock key sequences are correct.
If the correct unlock keys are not pressed before the mask timer
expires, the state machine starts over. The first key event inter-
rupt is generated to allow the software to see that the user has
pressed a key so that the host can turn on the LCD and display
the unlock message. The host then reads the lock status register
to see if the keypad is unlocked. After the first key event
GPIEM_
CFG
OVERFLOW INTERRUPT
KEY EVENT INTERRUPT
KEYLOCK INTERRUPT
GPIO INTERRUPT
KEYPAD LOCK INTERRUPT MASK TIMER
OVR_FLOW_
INTERRUPT CONFIGURATION
IEN
K_LCK_IM GPI_IEN KE_IEN
OR
K_LCK_EN
Figure 13. INT Pin Drive
Rev. B | Page 11 of 24
interrupt, the state machine does not interrupt the processor
again unless the correct sequence is keyed. The state machine is
reset if the correct sequences are not keyed before the keypad
lock interrupt mask timer expires.
The state of the keypad lock interrupt mask bit (Register 0x01,
Bit 2) in the configuration register determines whether the
interrupt pin is asserted when the keylock interrupt status bit
(Register 0x02, Bit 2) is set. Setting the keylock interrupt mask
bit causes the INT pin to be asserted when the keylock interrupt
status bit is set in Register 0x02; clearing that bit masks the
interrupt, causing the interrupt pin not to respond to the keylock
interrupt status bit. The mask interrupt timer should be set for
the time that it takes for the LCD to dim or turn off so that, if a
key is pressed, the backlight is set to bright mode again or reset
to turn on the LCD.
When the unlock mask interrupt timer equals 0, only the
correct unlock sequence can generate an interrupt. Disabling
the unlock mask interrupt timer allows the processor to remain
undisturbed for situations in which the user, for example, has
the phone in a pocket or purse and the keys are constantly
pressed. The flowchart in Figure 11 shows the interaction of
interrupt enable, key event counter, key event interrupt status,
and interrupt generation.
LOGIC
INT
INT
V
CC
ADP5587

Related parts for ADP5587_1