Datasheet
ADP5520
Rev. A | Page 17 of 40
To deassert the nINT pin and clear the KR_INT flag, Register 0x22
and Register 0x23 must be cleared by reading them once, and then
a 1 must be written to the KR_INT bit in Register 0x00. Figure 39
shows the interrupt generation scheme, where KR_x_ISTAT
represents any one of the 16-key release interrupt status bits.
I/O EXPANSION PINS AND ILED PIN (AUXILIARY
LED CURRENT SINKS)
The ILED pin and two of the I/O expansion pins (R3 and C3)
can be used as auxiliary LED current sinks. Each LED current
sink is programmable up to 14 mA (typical) and can be
independently turned on and off.
AND
KP_x_ISTAT KR_INT
KP_IEN
nINT
DRIVE
READ ONCE
TO CLEAR
REG 0x00
WRITE 1
TO CLEAR
REGISTERS
0x22 AND 0x23
REG 0x01
07445-028
The ILED pin is the current sink for LED 1. Its sink current can
be set using LED1_CURRENT in Register 0x14. The LED 1
sink can be enabled with LED1_EN in Register 0x11.
Figure 39. Key Release Interrupt Generation
The C3 pin is the current sink for LED 2. Its sink current can be
set using LED2_CURRENT in Register 0x15. The LED 2 sink
can be enabled with LED2_EN in Register 0x11.
The backlight can be programmed to turn on as a consequence
of a key press, using the KP_BL_EN bit in Register 0x02. To
enable this feature, the following sequence should be observed:
The R3 pin is the current sink for LED 3. Its sink current can be
set using LED3_CURRENT in Register 0x16. The LED 3 sink
can be enabled with LED3_EN in Register 0x11.
1.
Enable the row pull-ups using Register 0x1F.
2.
Enable key scanning on rows and columns using
Register 0x17.
The LEDx_CURRENT registers are six bits wide, allowing the
user to set the LED sink current to one of 64 different levels
between 0 mA and 14 mA. The ADP5520 can implement two
distinct algorithms, to achieve a linear and a nonlinear
relationship between input code and sink current.
3.
Enable backlight turn-on due to key press by setting
KP_BL_EN in Register 0x02.
4.
Set device to operating mode (nSTNBY = 1) in Register 0x00.
When a key is pressed, the backlight turns on. If the off timer is
programmed, the backlight turns off, or the user can turn off
the backlight by clearing BL_EN.
By default, the ADP5520 uses a linear algorithm (LED_LAW = 0),
where the LED sink current increases linearly for a corresponding
increase of input code. LED sink current (in milliamps) is deter-
mined by the following equation:
If the user wants the backlight to turn on again with a subse-
quent key press, the KP_INT and KR_INT bits in Register 0x00
must be cleared.
LED Sink Current = Code × (Fullscale_Current/63) (3)
where:
Code is the input code programmed by the user.
Fullscale_Current is the maximum sink current allowed
(typically 14 mA).
07445-029
LED1_CURRENT
LED1_EN
LED1_OFFT
LED 1
DIGITAL
COUNTERS
AND
CONTROL
ILED
VBAT
C3
VBAT
R3
VBAT
LED2_CURRENT
LED2_EN
LED2_OFFT
LED 2
DIGITAL
COUNTERS
AND
CONTROL
LED3_CURRENT
LED3_EN
LED3_OFFT
LED 3
DIGITAL
COUNTERS
AND
CONTROL
LED_FI
LED_FO
LED_LAW
LED_ONT
Figure 40. LED Current Sinks