TI LM8502TMX

LM8502
Intelligent Lighting Management Unit That Fuses a 1.2A Dual High-Side
Flash LED Driver with a 10-Output Low-Side LED Driver
General Description
Features
The LM8502 is a versatile LED driver suitable for multiple applications. It includes a 2MHz, fixed-frequency synchronous
boost converter, 10 current sink LED outputs, 2 outputs for
flash or haptic applications, ambient light sensing and PWM
input.
The 10 current sink LED outputs offer individual current control through an I2C-compatible interface. Current can be accurately controlled with a full-scale setting and 8-bit current
control. The LM8502 also enables LED control with group
faders and lighting engines. Group faders enable single I2C
register writes for multiple LED outputs with fading, whereas
lighting engines with SRAM memory enable engine-driven
lighting sequences. Each LED output can be powered either
from VOUT or an external voltage supply.
The flash function is capable of driving 2 LEDs, each having
600 mA maximum current, or a single LED up to a 1.2A maximum current. A hardware flash enable provides a direct
interface to trigger the flash pulse. Dual TX inputs allow the
flash to be synchronized with the RF power system to prevent
excessive current draw from the system power supply. The
LM8502 also offers LED thermal sensing as a safety procedure for flash and separate indicator LED.
The LM8502 has two inputs for Ambient Light Sensing — together with the PWM input they enable Dynamic Backlight
Control. The LM8502 may also be used for haptic motor driving instead of flash. When the device is idle, featured Powersave mode and use of an external clock reduce current
consumption significantly.
● 10 Programmable Low-Side Current Sinks with flexible
PRODUCTION DATA information is current as of
publication date. Products conform to specifications per
the terms of the Texas Instruments standard warranty.
Production processing does not necessarily include
testing of all parameters.
powering from VOUT or external voltage source
● 1.2A Dual Flash LED Driver with Flash, Torch and Voltage
●
●
●
●
●
●
●
●
●
●
●
●
modes
Ambient Light Sensing Capability with two inputs
Up to 4000:1 dimming ratio for LED outputs
Flash LED Thermal Sensing and Current Scaleback
Hardware Flash, Torch Enable and Dual Synchronization
Inputs for RF Power Amplifier Pulse Events
Haptic Feedback Motor Driver
Two Lighting Engines for User-Defined Lighting
Sequences with 48 * 16 bits of SRAM memory
External clock pin for Power Save
External PWM Control Capability enabling for example
Dynamic Backlight Control
Fast I2C-Compatible Interface
General Purpose ADC for Measuring, i.e., LED Output
Voltages
Ultra-Small Solution Area < 32 mm2
30-bump (2.42 x 2.77 mm x 0.6 mm) 0.4 pitch micro SMD
Applications
●
●
●
●
Camera Phone LED Flash
General Illumination in Portable Devices
Haptic Feedback Motor Driver
Fun Lighting
300787 SNVS592C
Copyright © 1999-2012, Texas Instruments Incorporated
LM8502
Typical Application Circuits
30078701
30078702
2
Copyright © 1999-2012, Texas Instruments Incorporated
LM8502
Connection Diagrams and Package Mark Information
Connection Diagrams
30078713
Bottom View
30078703
Top View
30078765
Package Marking
Ordering Information
Order Number
LM8502TME
LM8502TMX
Package
TMD30SQA
Copyright © 1999-2012, Texas Instruments Incorporated
Package Marking
8502
Supplied As
250 units, Tape-and-Reel
No-Lead
YES (NOPB)
3000 units, Tape-and-Reel
3
LM8502
Pin Descriptions
Pin
Function
A1
FLASH2/VIBRAN High Side Current Source Output for Flash LED or Output for Haptic Feedback
A2
FLASH1/VIBRAP High Side Current Source Output for Flash LED or Output for Haptic Feedback
A3, B3
OUT
Step-Up DC/DC Converter Output
A4, B4
SW
Drain Connection for Internal NMOS and Synchronous PMOS Switches
A5, B5
GND
B1
D9
Ground
LED Output 9
B2
D10/ALS2
C1
D7
LED Output 7
C2
D8
LED Output 8
LED Output 10 or Secondary Ambient Light Sensor Input
LEDI/NTC
Configurable as a High Side Current Source Output for Indicator LED or Threshold Detector for
LED Temperature Sensing (Leave unconnected if not used)
C4
STROBE
Active High Hardware Flash Enable. Drive STROBE high to turn on Flash pulse (Connect to GND
if not used)
C5
VIN
Input Voltage Connection
D1
D5
LED Output 5
D2
D6
LED Output 6
C3
D3
D4
4
Name
ALS1
Primary Ambient Light Sensor Input (Leave unconnected if not used)
PWM/ENVM/TX2 Configurable as PWM Input, an Active High Voltage mode Enable or Dual Polarity Power Amplifier
Synchronization Input (connect to GND if not used).
Configurable as an RF Power Amplifier Synchronization Control Input or Hardware Torch Enable
(connect to GND if not used).
D5
TX1/TORCH
E1
D3
LED Output 3
E2
D4
LED Output 4
E3
INT
Interrupt for MCU (Leave unconnected if not used)
E4
CLK
External 32 kHz Clock Input (Connect to GND if not used)
E5
EN
Enable/Reset
F1
D1
LED Output 1
F2
D2
LED Output 2
F3
TRIG
Trigger Input/Output for Lighting Engines (Connect to GND if not used)
F4
SCL
Serial Clock Input
F5
SDA
Serial Data Input/Output
Copyright © 1999-2012, Texas Instruments Incorporated
LM8502
Absolute Maximum Ratings (Note 1, Note 2)
If Military/Aerospace specified devices are required, please contact the Texas Instruments Sales Office/ Distributors for
availability and specifications.
VIN, VSW, VOUT,VFLASH LEDS 1,2, VLED
VLEDI/NTC(Note 11)
Voltage on Logic Pins (Input or Output
Pins)
OUTPUTS,
Continuous Power Dissipation
Junction Temperature (TJ-MAX)
Storage Temperature Range
Maximum Lead Temperature
(Soldering)
−0.3V to 6V
−0.3V to VIN
+0.3V with 6.0V
max
Internally Limited
+150°C
−65°C to +150° C
Operating Ratings
VIN
Junction Temperature (TJ)
Ambient Temperature (TA)
2.7V to 5.5V
−30°C to +125°C
−30°C to +85°C
Thermal Properties
Junction-to-Ambient Thermal
Resistance (θJA)
60°C/W
ESD Caution Notice
Texas Instruments recommends that all integrated circuits be handled with appropriate ESD
precautions. Failure to observe proper ESD handling techniques can result in damage to the device.
Electrical Characteristics
Limits in standard typeface are for TA = +25°C. Limits in boldface type apply over the full operating ambient temperature range
(-30°C ≤ TA ≤ +85°C). Unless otherwise specified, VIN = 3.6V, VEN = VIN.
Symbol
ISTANDBY
Parameter
Current Consumption in
Standby mode
Conditions
Min
EN = 0, chip_en bit = 0
Typ
Max
0.3
Units
µA
FLASH OUTPUT SPECIFICATIONS
IFLASH1 + IFLASH2
IFLASH1 or
IFLASH2
Flash Current Source
Accuracy
VHR
Current Source Regulation
Voltage (VOUT − VFLASH)
IMATCH
IFLASH1 or IFLASH2
IFLASH1 or IFLASH2
600 mA Flash
LED Setting
36 mA Torch
Current Setting
−8 %
1200
+8%
−10 %
600
+10%
−10 %
36
+10 %
600 mA setting, VOUT = 3.75V
mA
250
mV
Flash LED Current Matching 600 mA setting, VFLASH = 3V
0.5
%
tTX
Flash-to-Torch Flash LED
Current Settling Time (Note
9)
TX Low to High, IFLASH1 + IFLASH2 = 1.2A to
180 mA
20
µs
VIN_TH
VIN Monitor Trip Threshold
VIN Falling, VIN Monitor register = 0x01
(Enabled with VIN_TH = 3.0V)
VNTC_TRIP
NTC Comparator Threshold
VNTC_HYST
Hysteresis of NTC
LEDI/NTC bit = 1
2.8
3.0
3.2
−5%
1
+5%
HYST bit = 0
125
HYST bit =1
250
V
mV
HAPTIC OUTPUT SPECIFICATIONS
RPMOS
PMOS Switch ONResistance
800
RNMOS
NMOS Switch ONResistance
800
Copyright © 1999-2012, Texas Instruments Incorporated
mΩ
5
LM8502
Symbol
PWM
frequency
Parameter
Conditions
Min
PWM on both channels
(register 21H setting '11' for
bits [4:3])
Typ
Max
7.8
Units
kHz
STEP-UP DC/DC CONVERTER SPECIFICATIONS
IOUT = 0mA, Constant Voltage mode, 5V
setting
4.8
5
5.2
On Threshold, 2.7V ≤ VIN ≤ 5.5V
5.5
5.6
5.7
Off Threshold
5.2
5.4
5.5
VOUT_ACCU
Output Voltage Accuracy
VOVP
Output Over Voltage
Protection Trip Point
RPMOS
PMOS Switch OnResistance
IPMOS = 250 mA
170
RNMOS
NMOS Switch OnResistance
INMOS = 1A
130
ICL
Switch Current Limit
CL bits = 10
IOUT_SC
Output Short Circuit Current
VOUT < 2.3V
Limit
fSW
Switching Frequency
2.7V ≤ VIN ≤ 5.5V
Passmode Supply Current
Device Not Switching, chip_en bit = '1',
boost_en bit = '1'
IPASSMODE
V
mΩ
1.7
2
2.3
550
1.9
2
A
mA
2.1
350
MHz
µA
LEDI SPECIFICATIONS
ILEDI/NTC
Indicator Current
LEDI/NTC bit = 1
IND1, IND0 bits =
00
2.2
IND1, IND0 bits =
01
4.4
IND1, IND0 bits =
10
6.6
IND1, IND0 bits =
11
8.8
mA
LED DRIVER ELECTRICAL CHARACTERISTICS
ILEAKAGE
Leakage Current
Outputs D1 to D10
0.1
IMAX
Maximum Sink Current
Outputs D1 to D10 (with maximum fullscale current setting)
25.5
IOUT
Output Current Accuracy
(Note 12)
Output Current Set to 17.5 mA
IMATCH
Matching (Note 12)
Output Current Set to 17.5 mA
1
VSAT
Saturation Voltage
Output Current Set to 17.5 mA
45
−5
1
µA
mA
+5
65
%
mV
GENERAL PURPOSE ADC ELECTRICAL CHARACTERISTICS
LSB
Least Significant Bit (Note 9)
30
mV
EABS
Total Unadjusted Error (Note
VIN_TEST = 0V to VIN
8)
±3
LSB
tCONV
Conversion Time (Note 9)
VIN_TEST
DC Voltage Range (Note 9)
2.7
0
ms
5
V
LOGIC INPUT EN VOLTAGE SPECIFICATIONS (VEN = 1.65 to VIN unless otherwise noted)
VIL
Input Logic Low
VIH
Input Logic High
1.2
II
Input Current
−1.0
0.5
V
1.0
µA
0.2xVEN
V
LOGIC INPUT SCL, SDA, CLK, STROBE, TX1/TORCH, PWM/ENVM/TX2, TRIG
VIL
Input Logic Low
VIH
Input Logic High
II
Input Current
6
0.8xVEN
−1.0
V
1.0
µA
Copyright © 1999-2012, Texas Instruments Incorporated
LM8502
Symbol
Parameter
Conditions
Min
Typ
Max
Units
1.0
µA
LOGIC OUTPUT SDA, TRIG, INT
VOL
Output Low Level
IL
Output Leakage Current
IOUT = 3 mA
0.3
V
RECOMMENDED EXTERNAL CLOCK SOURCE (CLK) CONDITIONS (Note 9, Note 10)
fCLK
Clock Frequency
tCLKH
High TIme
6
tCLKL
Low Time
6
tr
Clock Rise TIme
10% to 90%
2
Clock Fall Time
90% to 10%
2
tf
FAST MODE
I2C-COMPATIBLE
32.7
kHz
µs
TIMING SPECIFICATIONS (SCL, SDA) (Note 9)
fSCL
SCL Clock Frequency
1
Hold Time (repeated) START
Condition
0.6
2
Clock Low Time
1.3
3
Clock High Time
0.6
4
Setup Time for a Repeated
START Condition
0.6
5
Data Hold Time
50
6
Data Setup Time
100
7
Rise Time of SDA and SCL
20+0.1Cb
300
8
Fall Time of SDA and SCL
15+0.1Cb
300
9
Set-up Time for STOP
condition
600
10
Bus Free Time Between a
STOP and a START
Condition
1.3
Cb
Capacitive Load Parameter
for Each Bus Line. Load of
One Picofarad Corresponds
to One Nanosecond
10
Fast mode
400
kHz
µs
ns
µs
200
ns
3.4
MHz
HIGH-SPEED MODE I2C-COMPATIBLE TIMING SPECIFICATIONS (SCL, SDA) (Note 9)
fSCL
SCL Clock Frequency
1
Hold Time (repeated) START
Condition
160
2
Clock Low Time
160
3
Clock High Time
60
4
Setup Time for a Repeated
START Condition
160
5
Data Hold Time
0
6
Data Setup Tme
10
7
Rise Time of SCLH
10
40
Rise Time of SDAH
10
80
Fall Time of SCLH
10
40
Fall Time of SDAH
10
80
9
Set-up Time for STOP
Condition
160
10
Bus Free Time Between a
STOP and a START
Condition
160
8
Copyright © 1999-2012, Texas Instruments Incorporated
70
ns
7
LM8502
30078704
FIGURE 1. I2C Timing
Note 1: Absolute Maximum Ratings indicate limits beyond which damage to the device may occur. Operating Ratings are conditions under which operation of the
device is guaranteed. Operating Ratings do not imply guaranteed performance limits. For guaranteed performance limits and associated test conditions, see the
Electrical Characteristics table.
Note 2: All voltages are with respect to the potential at the GND pin.
Note 3: Internal thermal shutdown circuitry protects the device from permanent damage. Thermal shutdown engages at TJ = 150°C (typ.) and disengages at TJ
= 135°C (typ.).
Note 4: For detailed soldering specifications and information, please refer to Texas Instruments Application Note 1112: Micro SMD Wafer Level Chip Scale
Package (AN-1112).
Note 5: In applications where high power dissipation and/or poor package thermal resistance is present, the maximum ambient temperature may have to be
derated. Maximum ambient temperature (TA-MAX) is dependent on the maximum operating junction temperature (TJ-MAX-OP = +125°C), the maximum power
dissipation of the device in the application (PD-MAX), and the junction-to-ambient thermal resistance of the part/package in the application (θJA), as given by the
following equation: TA-MAX = TJ-MAX-OP – (θJA × PD-MAX).
Note 6: Junction-to-ambient thermal resistance (θJA) is taken from a thermal modeling result, performed under the conditions and guidelines set forth in the JEDEC
standard JESD51-7. The test board is a 4-layer FR-4 board measuring 102mm x 76mm x 1.6mm with a 2x1 array of thermal vias. The ground plane on the board
is 50mm x 50mm. Thickness of copper layers are 36µm/18µm/18µm/36µm (1.5oz/1oz/1oz/1.5oz). Ambient temperature in simulation is 22°C, still air. Power
dissipation is 1W.
Note 7: Min and Max limits are guaranteed by design, test, or statistical analysis. Typical (Typ) numbers are not guaranteed, but do represent the most likely
norm. Unless otherwise specified, conditions for typical specifications are: VIN = 3.6V and TA = +25°C.
Note 8: Total unadjusted error includes offset, full-scale and linearity errors.
Note 9: Guaranteed by design. VEN = 1.65V to VIN.
Note 10: The ideal external clock signal for the LM8502 is a 0V to VEN, 25% to 75% duty-cycle square wave. At frequencies above 32.7 kHz program execution
will be faster, and at frequencies below 32.7 kHz program execution will be slower.
Note 11: Voltage spikes on SW pin can be higher than 6V.
Note 12: Output Current Accuracy is the difference between the actual value of the output current and programmed value of this current. Matching is the maximum
difference from the average. For the constant current outputs on the part (D1 to D10), the following are determined: the maximum output current (MAX), the
minimum current (MIN) and the average output current of all outputs (AVG). Two matching numbers are calculated: (MAX-AVG)/AVG and (AVG-MIN)/AVG. The
largest number of the two (worst case) is considered the matching figure. The typical specification provided is the most likely norm of the matching figure for all
parts. Note that some manufacturers have different specifications in use.
8
Copyright © 1999-2012, Texas Instruments Incorporated
LM8502
Typical Performance Characteristics
VIN = 3.6V, Flash LEDs are OSRAM LW C9SP, White LEDs
OSRAM LWQ38, COUT = 10 µF, CIN = 10 µF, L = Coilcraft LPS3015–222MLB, TA = +25°C unless otherwise specified.
Boost Efficiency with Constant Current Load
(Voltage Output Mode, 5V)
Boost Efficiency with Constant Current Load vs Load Current
(Voltage Output Mode, 5V)
30078709
LED Efficiency (OSRAM LWQ38)
30078711
Flash LED Efficiency vs VIN
(Single Flash LED)
30078717
30078721
Input Current vs VIN
(Single Flash LED)
Flash LED Efficiency vs VIN
(Dual Flash LED)
30078726
Copyright © 1999-2012, Texas Instruments Incorporated
30078714
9
LM8502
Flash LED Current vs VIN
(Dual Flash LED)
Flash LED current vs VIN
30078716
30078715
Startup into Flash Mode
Single LED
IFLASH = 1.2A
Startup into Torch Mode
Single LED, Hardware Torch Mode, 93.75 mA Torch Setting
ITORCH = 180 mA
30078760
Channel1: VOUT (2V/div)
Channel4: ILED (500mA/div)
Channel2: IL (500 mA/div)
Channel3: STROBE (5V/div)
Time Base: 100 µs/div
10
30078761
Channel1: VOUT (2V/div)
Channel4: IL (100 mA/div)
Channel2: IL (500 mA/div)
Channel3: TX1 (5V/div)
Time Base: 100 µs/div
Copyright © 1999-2012, Texas Instruments Incorporated
LM8502
Block Diagram
30078705
Copyright © 1999-2012, Texas Instruments Incorporated
11
LM8502
Applications Information
APPLICATION DESCRIPTION
The LM8502 can be used in multiple applications. With two Flash/ Haptic outputs and 10 low-side outputs, the LM8502 is usable
in flash applications as well as in general illumination applications.
The current sink drivers provide full-scale current setting and current range up to 25.5 mA with maximum full-scale current setting.
Each LED output can be powered either from VOUT or from external voltage supply. LED outputs can be used for backlight applications as well as for fun lighting. For backlight applications the LM8502's LED outputs may be grouped and controlled from one
register; fading on and off times may be set for the group. LED outputs can be freely grouped into one of the three groups. Two
ambient light sensor inputs support the backlight application (LED output 10 is optional) with the secondary ambient light sensing
input. The incorporated input for PWM signal enables dynamic backlight control.
For fun lighting the LM8502 offers lighting engines. Controlling outputs with engines enables flexible programming including ramps,
loops, and triggering, among others. Programmable lighting engines enable impressive lighting sequences. Once the program is
loaded into the LM8502's memory and the program started, the device handles running of the lighting sequence, and no I2C writes
are needed during execution. Engines can be set to start with external triggering, and they can send interrupt to the MCU via INT
pin.
For Flash applications the LM8502 offers an external Strobe pin, power amplifier synchronization or hardware torch enable (TX1),
as well as another power amplifier synchronization input or Voltage mode enable (TX2). The flash driver is capable of delivering
1.2A to a single flash LED or 600 mA into two parallel LEDs. The device also features an indicator LED to, for example, indicating
flash events. A threshold detector for a negative temperature coefficient thermistor can detect temperature near flash LEDs. Indicator and NTC are on the same pin and alternate with each other.
When Flash driving capability is not needed, the outputs can be used, for example, to drive a vibra motor. The LM8502 includes
controls for enabling different kind of modes and PWM frequencies when driving a vibra motor. The device also has an 8-bit register
for haptic PWM control; the outputs can also be grouped or be driven from lighting engines. When one wants to use both a vibra
motor and flash on same application, two external FETs are needed to disable the flash while running the vibra motor. This kind
of application is shown in the figures below. LED output 10 is set to control the FET status. When driving the flash haptic should
be disabled.
Other features of the LM8502 include an external clock input pin, which enables efficient Power-save mode. In Power-save mode
almost all the analog blocks are shut down. Also, a general-purpose analog-to-digital converter (ADC), which can be used, for
example, to measure the LED voltages, is featured in the LM8502. This general purpose ADC, combined with lighting engines,
enables use of different sensors or audio synchronization. Sensor or audio synchronization input can be connected to, for example,
the INT pin. The value of the INT pin is read with the general-purpose ADC. This value can be passed to the lighting engines with
variables and be used to control the lighting effects.
12
Copyright © 1999-2012, Texas Instruments Incorporated
LM8502
30078786
FIGURE 2. LED Outputs Grouped into Main and Sub Displays
Copyright © 1999-2012, Texas Instruments Incorporated
13
LM8502
30078787
FIGURE 3. LED Outputs Partially Powered from External Voltage Supply
14
Copyright © 1999-2012, Texas Instruments Incorporated
LM8502
30078780
FIGURE 4. Two Ambient Light Sensors using Internal Resistors, One Flash LED with Thermal Sensing
Copyright © 1999-2012, Texas Instruments Incorporated
15
LM8502
30078781
FIGURE 5. Two Ambient Light sensors using External Resistors, One Flash LED with Thermal Sensing
16
Copyright © 1999-2012, Texas Instruments Incorporated
LM8502
30078785
FIGURE 6. Vibra Motor connected to Haptic Feedback Outputs
Copyright © 1999-2012, Texas Instruments Incorporated
17
LM8502
30078706
FIGURE 7. Audio Synchronization Connection (external components needed) for
Rectifying the Audio Signal (diode) and RC-filter
18
Copyright © 1999-2012, Texas Instruments Incorporated
LM8502
30078799
FIGURE 8. Flash and Vibra Motor together (two external FETs needed);
Functionality Selected with LED Output 10
Copyright © 1999-2012, Texas Instruments Incorporated
19
LM8502
APPLICATION COMPONENTS
Output Capacitor Selection
The LM8502 is designed to operate with a ceramic output capacitor of at least 4.7 µF in LED mode and a 10 µF output capacitor
in Voltage Output mode. When the boost converter is running, the output capacitor supplies the load current during the boost
converters on-time. When the NMOS switch turns off, the inductor energy is discharged through the internal PMOS switch, thus
supplying power to the load and restoring charge to the output capacitor. This causes a sag in the output voltage during the ontime and a rise in the output voltage during the off-time. The output capacitor is, therefore, chosen to limit the output ripple to an
acceptable level depending on load current and input/output voltage differentials and also to ensure the converter remains stable.
For proper LED operation the output capacitor must be at least 10 µF and ceramic. Larger capacitors such as a 22 µF can be used
if lower output voltage ripple is desired. To estimate the output voltage ripple considering the ripple due to capacitor discharge
(ΔVQ) and the ripple due to the capacitors ESR (ΔVESR) use the following equations:
For Continuous Conduction mode, the output voltage ripple due to the capacitor discharge is:
The output voltage ripple due to the output capacitors ESR is found by:
In ceramic capacitors the ESR is very low so assume that 80% of the output voltage ripple is due to capacitor discharge and 20%
from ESR. Table 1 lists different manufacturers for various output capacitors and their case sizes suitable for use with the LM8502.
Input Capacitor Selection
Choosing the correct size and type of input capacitor helps minimize the voltage ripple caused by the switching of the LM8502’s
boost converter and reduces noise on the device's input terminal that can feed through and disrupt internal analog signals. In the
Typical Application Circuits, a 10 µF ceramic input capacitor works well. It is important to place the input capacitor as close as
possible to the LM8502’s input terminals. This reduces the series resistance and inductance that can inject noise into the device
due to the input switching currents. Table 1 lists various input capacitors that or recommended for use with the LM8502.
TABLE 1. Recommended Input/Output Capacitors (X5R Dielectric)
Manufacturer
Part Number
Value
Case Size
Voltage Rating
TDK Corporation
C1608JB0J106M
10 µF
0603(1.6mm×0.8mm×0.8mm)
6.3V
TDK Corporation
C2012JB1A106M
10 µF
0805
(2mm×1.25mm×1.25mm)
10V
TDK Corporation
C2012JB0J226M
22 µF
0805
(2mm×1.25mm×1.25mm)
6.3V
Murata
GRM21BR61A106KE19
10 µF
0805
(2mm×1.25mm×1.25mm)
10V
Murata
GRM21BR60J226ME39L
22 µF
0805
(2mm×1.25mm×1.25mm)
6.3V
Inductor Selection
The LM8502 is designed to use a 2.2 µH inductor. Table 2 lists various inductors and their manufacturers that can work well with
the LM8502. When the device is boosting (VOUT > VIN) the inductor will typically be the biggest area of efficiency loss in the circuit.
Therefore, choosing an inductor with the lowest possible series resistance is important. Additionally, the saturation rating of the
inductor should be greater than the maximum operating peak current of the LM8502. This prevents excess efficiency loss that can
occur with inductors that operate in saturation and prevents overheating of the inductor and possible damage. For proper inductor
operation and circuit performance ensure that the inductor saturation and the peak current limit setting of the LM8502 is greater
than IPEAK. IPEAK can be calculated by:
20
Copyright © 1999-2012, Texas Instruments Incorporated
LM8502
ƒSW = 2MHz, and efficiency can be found in the Typical Performance Characteristics plots.
TABLE 2. Recommended Inductors
Manufacturer
L
Coilcraft
2.2 µH
TDK
2.2 µH
Part Number
Dimensions (L×W×H)
ISAT
LPS3015–222
3mm×3mm×1.2mm
2.3A
VLS252012T-2R2M1R3
2mm×2.5mm×1.2mm
1.5A
NTC Thermistor Selection
NTC thermistors have a temperature to resistance relationship of:
where β is given in the thermistor datasheet and R25°C is the thermistors value at +25°C. R3 in Figure 10 is chosen so that it is
equal to:
where R(T)TRIP is the thermistor's value at the temperature trip point, VBIAS is shown in Figure 9, and V TRIP = 1V (typ.). Choosing
R3 here gives a more linear response around the temperature trip voltage. For example, with VBIAS = 2.5V, a thermistor whose
nominal value at +25°C is 100 kΩ, and a β = 4500K, the trip point is chosen to be +93°C. The value of R(T) at 93°C is:
Figure 9 shows the linearity of the thermistor resistive divider of the previous example. With the internal hysteresis set to 125 mV
the comparator output will trip and turn the Flash current back on if the thermistor temperature drops to approximately +86°C.
30078734
FIGURE 9. Thermistor Resistive Divider Response vs Temperature
Another useful equation for the thermistor resistive divider is developed by combining the equations for R3, and R(T) and solving
for temperature. This gives the following relationship.
Copyright © 1999-2012, Texas Instruments Incorporated
21
LM8502
Using a spreadsheet such as Excel, different curves for the temperature trip point T(°C) can be created vs R3, Beta, or VBIAS in
order to better help choose the thermal components for practical values of thermistors, series resistors (R3) or reference voltages
for VBIAS.
Programming bit [3] of Configuration Register 1 with a '1' selects Thermal Comparator mode making the LEDI/NTC pin a comparator
input for flash LED thermal sensing. Figure 10 shows the internal block diagram of the thermal-sensing circuit which is OR’d with
both the TX1 and ENVM/TX2 (TX2 mode) to force the LM8502 from Flash to Torch mode. This is intended to prevent LED overheating during flash pulses. In NTC mode the internal comparator has a selectable 125 mV or 250 mV hysteresis (see Configuration
Register 1, Bit [4]).
The termination of the thermistor must be done directly to the cathode of the Flash LED. This will provide the best thermal coupling
(lowest thermal resistance). Consequently, with the thermistor tied to the LED's cathode, the thermistor's return can potentially see
large GND currents.
30078730
FIGURE 10. Thermistor Voltage Divider and Sensing Circuit
22
Copyright © 1999-2012, Texas Instruments Incorporated
LM8502
Functional Description
OVERVIEW
The LM8502 is a 12-LED output driver with a 1.2A synchronous boost converter. Two of the LED outputs are for driving flash LEDs
or a haptic vibra motor; 10 current sinks are for general illumination. The device incorporates a 2MHz constant frequency, synchronous, current-mode PWM boost converter.
Pins related to Boost Converter:
• Drain connection for internal NMOS and synchronous PMOS switches, SW pins (A4 and B4)
• Converter Output, OUT pins (A3 and B3)
Pins related to Flash:
• High-side current outputs for Flash LEDs, FLASH1 and FLASH2(A1 and A2), each capable of sourcing up to 600 mA current.
If not used for flash, can be used to drive, for example, a vibra motor.
• Active high hardware flash enable STROBE (C4). When set to high turns on the flash pulse. Connect to ground if not used.
• Configurable pin PWM/ENVM/TX2 (D4) can be configured as an active high-voltage-mode enable (ENVM) or as a dual-polarity
power-amplifier synchronization input (TX2). Polarity of TX input can be changed with a register bit, and when it occurs, it forces
Flash into Torch or Flash LED shutdown. Third function for this pin is PWM input enabling Dynamic Backlight Control. When
PWM input is used, ENVM or TX2 cannot be used. Connect to ground if not used.
• Configurable pin TX1/TORCH (D5) can be configured as an RF power amplifier synchronization input of hardware torch enable.
At TX1 event the Flash LEDs are forced to Torch mode. In Torch mode, when pin is set high, Flash LEDs are set to Torch
current level. Connect to ground if not used.
• Configurable pin LEDI/NTC (C3) can be configured as a high-side current source for indicator LED or threshold detector for
flash LED temperature sensing. Indicator LED has four current levels and can be used, for example, as flash event indicator.
When configured as NTC, the thermistor senses temperature near flash LEDs; when event occurs, according to a bit setting,
flash LEDs are set to either to Torch mode or to shutdown.
Pins related to LED controlling
• LED output pins D1 to D9 (F1 = Output 1, F2 = Output 2, E1 = Output 3, E2 = Output 4, D1 = Output 5, D2 = Output 6, C1 =
Output 7, C2 = Output 8 and B1 = Output 9). The urrent of these current sinks can be programmed through the registers with
full-scale current setting and current level. They also can be freely grouped into one of three group faders and be controlled
with a single register write. Also incorporated lighting engines can control these current sinks.
• LED output pin D10/ALS2 (B2 = Output 10) is basically same kind of current sink as all others with one exception: it can also
be configured as Ambient Light Sensing input.
• Note that all LED outputs can each be freely powered either from VOUT (Converter Output) or external voltage supply.
• TRIG pin (F3) is related to lighting engines. It is used as an external trigger to and from lighting engines.
Other pins
• VIBRAP and VIBRAN pins (A1 and A2) are optional with Flash outputs. They can be used for controlling, for example, a vibra
motor from a register or from lighting engines. When not used in haptic applications, thet can be used for Flash applications.
• VIN (C5) is the input voltage pin for the device. Voltage range is from 2.7 V to 5.5V.
• ALS1 (D3) is primary Ambient Light Sensing input.
• INT (E3) is interrupt for the micro-controller. Interrupts can come from lighting engine,s as well as from NTC and from ALS zone
change.
• CLK (E4) is an external 32 kHz clock input which enables powerful Power-save mode when device is in idle state.
• EN (E5) is the enable or reset pin for the device.
• SCL (F4) and SDA (F5) are the I2C-compatible interface clock input and data input/output.
• GND pins (A5 and B5) are for grounding the device.
Copyright © 1999-2012, Texas Instruments Incorporated
23
LM8502
MODES OF OPERATION
In the Reset mode all the internal registers are reset to the default values, and the device goes to Standby
mode after reset. CHIP_EN control bit is low after reset by default. Reset mode is entered always if the Reset
register is written or internal Power-On Reset is active. the LM8502 can be reset by writing any data to the
Reset register (address 3DH). Power-On Reset (POR) will activate during the device startup or when the
supply voltage VIN falls below 1.5V. Once VIN rises above 1.5V, POR will inactivate, and the device will
continue to the Standby mode.
STANDBY:
The Standby mode is entered if POR is inactive. In this mode all circuit functions are disabled. Most of the
registers can be written in this mode, and the control bits are effective immediately after startup.
STARTUP:
When EN pin is set to '1' the LM8502 initializes EPROM and SRAM memories. Setting the CHIP_EN bit to
'1' causes the INTERNAL STARTUP SEQUENCE to power up all the needed internal blocks. If the device
temperature rises too high, the Thermal Shutdown (TSD) disables the device operation, and Startup mode
is entered until no thermal shutdown is present.
BOOST STARTUP: Soft start for boost is generated in the Boost Startup mode. Boost Startup is entered from INTERNAL
STARTUP SEQUENCE if the EN_BOOST bit is set to '1', or from Normal mode when the EN_BOOST bit is
set to '1'. During Boost Startup all LED outputs are off to ensure smooth startup.
NORMAL:
During Normal mode the user controls the device using the Control registers. The registers can be written in
any sequence, and any number of bits can be altered in a register with one write.
POWER-SAVE:
Power-save mode is entered when the POWERSAVE_EN bit in Register 36H is set to '1'. This enables a
mode where almost all analog blocks are shut down, when the device is idle.
RESET:
30078783
FIGURE 11. Startup Sequence
24
Copyright © 1999-2012, Texas Instruments Incorporated
LM8502
LED DRIVER
Overview
The LM8502 has 10 current-sink-type LED outputs. The LED outputs can be controlled in three ways described later on. Each LED
output can be powered either from VOUT or from an external voltage supply. The selection of LED output powering can be done
from LED control registers (06H to 0FH) with the LEDx_BAT_CON bit. When the LEDx_BAT_CON bit is set to '0', LED output is
powered from VOUT. Note that changing LED powering does not enable boost converter automatically. Please also Note that LED
output 10 can be configured as an Ambient Light Sensing (ALS) input; the LED output will not turn on when configured as an ALS
input.
TABLE 3. Full-Scale Current
FSC Bit [1:0]
Max LED (mA)
Current step
size, linear scale
(µA)
00
3
11.7
01
6
23.5
10
12.5
50
11
25.5
95
TABLE 4. Current Control When Full-Scale Current Set to 25.5 mA
CURRENT bits
Output Current
0000 0000
0.0 mA
0000 0001
0.1 mA
0000 0010
0.2 mA
.... . .
.... . .
10101111
17.5 mA
...
...
11 111 111
25.5 mA
The Brightness Control register (BRGT) is an 8-bit register that programs the 255 different LED current levels. The code written to
BRGT is translated into an LED current as a percentage of ILED_FULLSCALE as set via the full-scale current bits (LED control
registers bits [4:3]). There are two selectable LED current profiles. Setting LED control register bit 5 to '1' selects the logarithmic
LED current response; setting this bit to '0' selects the linear weighted curve. With the maximum full-scale current and logarithmic
setting one can achieve up to 4000:1 dimming ratio with maximum full-scale setting at the first steps of logarithmic curve (6.25 µA/
25.5 mA = 1/4080). Current steps are displayed in Table 4 for linear scale. With a logarithmic setting the step size varies, but is at
minimum 0.78 µA when full-scale control is 00, and 6.25 µA when full-scale control is 11.
For LED dimming a logarithmic or linear scale can be applied — see the figure Figure 12. A logarithmic or linear scheme can be
set for both the program execution engine control and direct brightness control. By using a logarithmic brightness scale the visual
effect looks like linear to the human eye. The logarithmic brightness scale is created with technique, which has internal resolution
of 12 bits. (8-bit control can be seen by user.)
Copyright © 1999-2012, Texas Instruments Incorporated
25
LM8502
30078707
30078777
FIGURE 12. LED Dimming In Linear and Logarithmic Modes
Controlling Brightness of LED Outputs
1. Direct Brightness Control
All LM8502 LED drivers, D1 to D10, can be controlled independently through the two-wire serial I2C-compatible interface. For
each high-side driver there is a current control register.
2. Controlling by Program Execution Engines
Engine control is used when the user wants to create programmed sequences. The program execution engine has higher
priority than direct control registers. Therefore, if the user has set a certain value to the current register, it will be automatically
overridden when the program execution engine controls the driver. LED control and program execution engine operation are
described later on.
3. Group Fader Control
In addition to LED-by-LED current register control, the LM8502 is equipped with group fader control which allows the user to
fade in or fade out multiple LEDs by writing to only one register. This is a useful function to minimize serial bus traffic between
the MCU and the LM8502. The LM8502 has three group fader registers, thus, it is possible to form three fader groups. Fadein and fade-out times can also be set with the device. These times control the time when ramping up or down the group current
value. Time can be set with 4 bits according to the following table:
TABLE 5. Fade in/out times
26
FADE IN/FADE OUT
Time, s
0000
0.0
0001
0.05
0010
0.1
0011
0.2
0100
0.3
0101
0.4
0110
0.5
0111
0.6
1000
0.7
1001
0.8
1010
0.9
1011
1.0
1100
1.5
1101
2.0
1110
3.0
1111
4.0
Copyright © 1999-2012, Texas Instruments Incorporated
LM8502
When the LM8502 is shut down (through chip_en), the fading off may be achieved. When the “fade-to-off” bit is set to 1, the
group fade times have effect, and the LEDs fade off according to the time set in the register. Note that Ambient Light Sensing
and PWM input are also set through these group fader controls.
LM8502 ENGINE PROGRAMMING
The LM8502 has two independent programmable lighting engines. Both lighting engines have their own program memory block
allocated by the user. Note that in order to access program memory the operation mode needs to be LOAD Program, at least for
one of the lighting engines. Please also note also that one should not change from RUN mode directly to LOAD program. Correct
sequence would be RUN (10) –> DISABLED (00) –> LOAD (01). Program execution is clocked with 32 768 Hz clock. This clock
can be generated internally or by using an external 32 kHz clock that can be connected to CLK pin. Use of an external clock enables
synchronization of LED timing to this clock rather than to the internal clock. Note that the last instruction in the memory should be
END or GO_TO_START.
The engines have different priorities; when more than one engine is controlling the same LED output, LED engine 1 has the higher
priority than LED engine 2. Supported instruction set is listed in the tables below:
TABLE 6. LM8502 LED Driver Instructions
Inst.
Bit
[15]
Bit
[14]
Bit
[13]
Bit Bit Bit
[12] [11] [10]
Bit
[9]
Ramp
0
pres
c ale
Fast Ramp
1
1
0
0
0
1
0
Sign
Set Brightness
(Absolute value)
0
1
0
0
0
0
0
0
Brightness value
Set Brightness
(Relative value)
0
0
0
0
0
0
0
Sign
Brightness value
Wait
0
pres
c ale
Step time
Bit
[8]
Bit
[7]
Bit
[6]
Bit
[5]
Sign
Time
Bit
[4]
Bit
[3]
Bit
[2]
Bit
[1]
Bit
[0]
# of increments
Step Size
0
0
# of increments
0
0
0
0
0
0
0
TABLE 7. LM8502 LED Driver Instructions with Variables
Inst.
Bit
[15]
Bit Bit Bit Bit Bit
[14] [13] [12] [11] [10]
Bit
[9]
Bit
[8]
Bit
[7]
Bit
[6]
Variable Ramp
1
0
0
0
0
1
0
0
0
0
Variable Set
Brightness
1
0
0
0
0
1
0
0
0
1
Bit
[5]
Bit
[4]
pres sign
cale
1
Bit
[3]
Bit
[2]
step time
0
0
0
Bit
[4]
Bit
[3]
Bit
[2]
Bit
[1]
Bit [0]
# of
increments
Brightness
value
TABLE 8. LM8502 LED Mapping Instructions
Inst.
Bit Bit
[15] [14]
Bit
[13]
Bit
[12]
Bit
[11]
Bit
[10]
Bit
[9]
Bit
[8]
Bit
[7]
Bit
[6]
Bit
[5]
Bit
[1]
Bit [0]
mux_ld_start
1
0
0
1
1
1
0
0
0
SRAM address 0 – 47
mux_ld_end
1
0
0
1
1
1
0
0
1
SRAM address 0 – 47
mux_sel
1
0
0
1
1
1
0
1
0
mux_clr
1
0
0
1
1
1
0
1
0
0
0
0
0
0
0
0
mux_inc
1
0
0
1
1
1
0
1
1
0
0
0
0
0
0
0
mux_dec
1
0
0
1
1
1
0
1
1
1
0
0
0
0
0
0
mux_set
1
0
0
1
1
1
1
1
1
Copyright © 1999-2012, Texas Instruments Incorporated
LED/haptic select
SRAM address 0 – 47
27
LM8502
TABLE 9. LM8502 BRANCH Instructions
Inst.
Bit
[15]
Bit
[14]
Bit
[13]
Bit
[12]
Bit
[11]
Bit
[10]
Bit
[9]
Bit [8]
Bit
[7]
Bit
[6]
Bit
[5]
Bit
[4]
Bit
[3]
Bit
[2]
Bit
[1]
Bit
[0]
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
Go to Start
Branch
1
0
1
Int
1
1
0
0
0
Loop count
1
0
0
0
0
0
0
Step number
0
0
0
0
End
1
1
0
Int
Res
et
0
X
X
X
X
X
X
X
X
X
X
Trigger
1
1
1
Ext.
trig
X
Ext.
trig
X
Wait for a trigger
X
X
Send a trigger
ENGI ENGI
NE2 NE1
X
X
X
ENG ENG
I NE2 INE1
X
TABLE 10. LM8502 Variable Branch Instruction and Conditional Instructions
Bit
[15]
Bit
[14]
Bit
[13]
Bit
[12]
Bit
[11]
Bit
[10]
Bit
[9]
Variable
Branch
1
0
0
0
0
1
1
jne (jump if
not equal)
1
0
0
0
1
0
0
Number of instructions to be
skipped if the operation returns true
variable 1
variable 2
jl (jump if
less)
1
0
0
0
1
0
1
Number of instructions to be
skipped if the operation returns true
variable 1
variable 2
jge (jump if
greater than)
1
0
0
0
1
1
0
Number of instructions to be
skipped if the operation returns true
variable 1
variable 2
je (jump if
equal)
1
0
0
0
1
1
1
Number of instructions to be
skipped if the operation returns true
variable 1
variable 2
Bit
[3]
Bit
[2]
Bit
[1]
Bit
[0]
Bit
[2]
Bit
[1]
Bit
[0]
Inst.
Bit
[8]
Bit
[7]
Bit [6]
Bit
[5]
Bit
[4]
Bit
[3]
Bit [2] Bit [1]
step number
Bit
[0]
loop count
TABLE 11. Data Transfer and Arithmetic Instructions
Bit
[15]
Bit
[14]
Bit
[13]
Bit
[12]
ld
1
0
0
1
add
1
0
0
sub
1
0
0
Inst.
Bit
[11]
Bit
[10]
Bit
[9]
Bit
[8]
Bit
[7]
Bit
[6]
Bit
[5]
Bit
[4]
target
variable
0
0
8-bit value
1
target
variable
0
1
8-bit value
1
target
variable
1
0
8-bit value
TABLE 12. Arithmetic Instructions with Variables
Bit
[15]
Bit
[14]
Bit
[13]
Bit
[12]
Variable
add
1
0
0
1
Variable
sub
1
0
0
1
Inst.
28
Bit
[11]
Bit
[10]
Bit
[9]
Bit
[8]
Bit
[7]
Bit
[6]
Bit
[5]
Bit
[4]
Bit
[3]
target
variable
1
1
0
0
0
0
variable 1
variable 2
target
variable
1
1
0
0
0
1
variable 1
variable 2
Copyright © 1999-2012, Texas Instruments Incorporated
LM8502
RAMP INSTRUCTIONS
RAMP Instruction
This instruction is useful for smoothly changing from one brightness value into another on the D1 to D10 outputs, in other words
generating ramps (with a negative or positive slope). The LM8502 allows programming of very fast and very slow ramps.
Ramp instruction generates a brightness ramp, using the effective brightness value as a starting value. At each ramp step the
output is incremented/decremented by one unit, unless the step time span is 0 or incremental value is 0. Time span for one ramp
step is defined with prescale-bit [14] and step time-bits [13:9]. Prescale = 0 sets 0.49 ms cycle time, and prescale = 1 sets 15.6 ms
cycle time, so the minimum time span for one step is 0.49 ms (prescale * step time span = 0.49ms x 1); the maximum time span
is 15.6 ms x 31 = 484ms/step.
If all the step time bits [13:9] are set to zero, depending on the prescale instruction works as absolute or relative set_brightness
instruction. If prescale is set to '0' (Set Brightness Relative value), all the mapped LED outputs are increased or decreased (depending on the sign bit) with a value defined by # of increments in 0.49 ms. With relative value the sign defines whether the BRGT
value is decremented or incremented If the prescale is set to '1' (Set Brightness Absolute value), all the mapped LED outputs are
set to same current level defined by # of increments in 0.49 ms regardless of the effective brightness level.
The incremental value defines how many steps will be taken during one ramp instruction — increment maximum value is 255d,
which equals incrementing from zero value to the maximum value. If brightness reaches minimum/maximum value (0/255) during
the ramp instruction, the ramp instruction will be executed to the end regardless of saturation. This enables ramp instruction to be
used as a combined ramp & wait instruction. Note: Ramp instruction is the wait instruction when the increment bits [7:0] are set to
zero. Setting bit LOG_EN high/low sets logarithmic (1) or linear ramp (0). By using the logarithmic ramp setting the visual effect
appears like a linear ramp, because the human eye behaves in a logarithmic way.
TABLE 13. RAMP
Name
Value (d)
0
Divides master
clock (32.768 Hz)
by 16 = 2048 Hz
resulting 0.488 ms
cycle time
1
Divides master
clock (32.768 Hz)
by 512 = 64 Hz
resulting 15.625
ms cycle time
0
Increase
brightness output
1
Decrease
brightness output
0 - 31
One ramp
increment done in
(step time) x
(prescale).
0 - 255
The number of
increment/
decrement cycles
Note: Value 0
takes the same
time as increment
prescale
sign
step time
# of increments
Description
FAST RAMP Instruction
The fast ramp instruction generates a brightness ramp, using the effective brightness value as a starting value. At each ramp step
the output is incremented/decremented by step size. Time span for one ramp step is always 0.49 ms. The time span for the whole
ramp is determined by the number of increments. For example if step size is 4 and the number of increments is 40, the whole ramp
time span is 40*0.49 ms = 19.6 ms. For every 0.49 ms mapped, output brightnesses are incremented by 4, so full ramp increments
the mapped output values by 40*4 = 160.
Copyright © 1999-2012, Texas Instruments Incorporated
29
LM8502
TABLE 14. FAST RAMP
sign
0
Increase brightness output
1
Decrease brightness output
0–3
(0=2, 1=4, 2=8, 3=16)
step size
# of increments
1–63
Value indicating how much the brightness
is incremented in 0.49 ms
The number of increment/decrement
cycles
RAMP Instruction with Variables
Programming ramps with variables is very similar to programming ramps with numerical operands. The only difference is that when
the instruction is starated, the step time and number of increments are captured from variable registers. If the variables are updated
after starting the instruction execution, it will have no effect on instruction execution. Again, at each ramp step the mapped outputs
are incremented/decremented by one unless step time is 0 or increment is 0. Time span for one step is defined with prescale and
step time bits. Step time is defined with variables A, B, C or D. Variables A, B and C are set with LED instruction. Variable D is a
global variable and can be set by writing the I2C Variable register 3CH. General purpose ADC result can be used as a source for
variable D as well. Note that FAST RAMP instruction cannot use variables.
TABLE 15. RAMP with Variable
Name
Value (d)
Description
step time
0–3
0 = local variable A
1 = local variable B
2 = global variable C
3 = I2C variable register value or general
purpose ADC value, variable D
One ramp increment done in (step time) x
(prescale). Step time is loaded with the
value of the variable. The value of the
variable should be from 0–31 for correct
operation
# of increments
0–3
0 = local variable A
1 = local variable B
The number of increment/decrement
2 = global variable C
cycles. Value is taken from variable.
3 = I2C variable register value or general
purpose ADC value, variable D
LED MAPPING INSTRUCTIONS
These commands define the engine-to-LED mapping. The mapping information is stored in a table, which is stored in the SRAM
(program memory of the LM8502). Location of the mapping table can exist anywhere in SRAM. LM8502 has two lighting engines
(Engines) which can be mapped to 10 LED drivers or haptic driver freely. Each mapping takes one 16-bit instruction and a mapping
table consists of multiple mappings. The engines can use the same mapping table or have their own mapping table. Each of the
LED outputs or haptic output is mapped by following manner (note that this is also the way they are written into the SRAM memory):
These commands define the engine-to-LED mapping. The mapping information is stored in a table, which is stored in the SRAM
(program memory of the LM8502). Location of the mapping table can exist anywhere in SRAM. LM8502 has two lighting engines
(Engines) which can be mapped to 10 LED drivers or haptic driver freely. Each mapping takes one 16–bit instruction and a mapping
table consists of multiple mappings. The engines can use the same mapping table or have their own mapping table. Each of the
LED outputs or haptic output is mapped by following manner (note that this is also the way they are written into the SRAM memory):
TABLE 16. LED Mapping
Output
Value (dec) / (binary)
LED1
1 / 0000 0000 0000 0001
LED2
2 / 0000 0000 0000 0010
LED3
4 / 0000 0000 0000 0100
LED4
8 / 0000 0000 0000 1000
LED5
16 / 0000 0000 0001 0000
LED6
32 / 0000 0000 0010 0000
LED7
64 / 0000 0000 0100 0000
LED8
128 / 0000 0000 1000 0000
LED9
256 / 0000 0001 0000 0000
LED10
512 / 0000 0010 0000 0000
Haptic
1024 / 0000 0100 0000 0000
One mapping can control one or multiple LED outputs or haptic. In a case where multiple LED outputs or LED outputs and haptic
are mapped, one sets to '1' the applicable 'LED/haptic bit'. For example:
30
Copyright © 1999-2012, Texas Instruments Incorporated
LM8502
TABLE 17. Mapping Example
Mapped Outputs
Value (dec) / (binary)
LED1, LED3 and LED9
261 / 0000 0001 0000 0101
LED2, LED4, LED6, LED8, LED10 and haptic
1706 / 0000 0110 1010 1010
There are totally seven commands for the engine-to-LED driver control: mux_ld_start, mux_ld_end, mux_sel, mux_clr, mux_inc,
mux_dec, mux_set. Note that the LED mapping instructions do not update brightness values to LED outputs. Brightness values
are updated after ramp or set_brgt instructions.
MUX_LD_START; MUX_LD_END Instructions
Mux_ld_start and mux_ld_ end define the mapping table location in the memory. Mux_ld_start defines the start address, and
mux_ld_end indicates the end address of the mapping table. See .
MUX_SEL Instruction
With a mux_sel instruction one, and only one, LED driver can be connected to a lighting engine. Connecting multiple LEDs to one
engine is done with the mapping table. After the mapping has been released from an LED, the brightness register value will still
control the LED brightness.
TABLE 18. MUX_SEL
Name
LED select
Value (d)
0 - 16
Description
0 = no drivers
selected
1 = LED1 selected
2 = LED2 selected
...
9 = LED9 selected
10 = LED10
selected
11 = haptic
MUX_CLR Instruction
Mux_clr clears engine-to-driver mapping. After the mapping has been released from an LED, the Brightness register value will still
control the LED brightness. See .
MUX_INC Instruction
Mux_inc instruction sets the next row active in the mapping table each time it is called. For example, if the 2nd row is active after
a mux_inc instruction call, the 3rd row will be active. If the mapping table end is reached, activation will roll to the mapping table
start address the next time the mux_inc instruction is called. The engine will not push a new brightness value to the LED driver
output before a SET_BRGT or RAMP instruction is executed. If the mapping has been released from an LED, the value in the
Brightness register will still control the LED brightness. See .
MUX_DEC Instruction
Mux_dec instruction sets the previous row active in the mapping table each time it is called. For example, if the 3rd row is active,
after mux_dec instruction call the 2nd row will be active. If the mapping table start address is reached, activation will roll to the
mapping table end address the next time the mux_dec instruction is called. The engine will not push a new brightness value to the
LED driver output before a SET_BRGT or RAMP instruction is executed. If the mapping has been released from an LED, the value
in the Brightness register will still control the LED brightness. See .
MUX_SET Instruction
Mux_set sets the index pointer to point to the mapping table row defined by bits [6:0] and sets the row active. The engine will not
push a new brightness value to the LED driver output before SET_BRGT or RAMP instruction is executed. If the mapping has been
released from an LED, the value in the Brightness register will still control the LED brightness. See .
SET BRIGHTNESS INSTRUCTIONS
SET BRIGHTNESS Instruction
This instruction is used for setting the brightness value on the outputs D1 to D10 and haptic without any ramps. Set BRGT output
value from 0 to 255 with BRGT value bits [7:0]. Instruction execution takes sixteen 32 kHz clock cycles (=488 μs). Setting the
brightness can be relative or absolute depending on bit [14]. If bit is set to '0' (Set Brightness Relative value), all the mapped LED
outputs are increased or decreased (depending on the sign bit) with a value defined by the BRGT value in 0.49 ms. With relative
value bit [8] defines whether the BRGT value is decremented or incremented. If the prescale is set to '1' (Set Brightness Absolute
value), all the mapped LED outputs are set to the same current level defined by the BRGT value in 0.49 ms regardless of the
effective brightness level.
Copyright © 1999-2012, Texas Instruments Incorporated
31
LM8502
TABLE 19. SET BRIGHTNESS
Name
Setting type
Sign (only for
relative setting)
BRGT value
Value (d)
Description
Defines how the
0–1
brightness of
0 = relative setting
mapped LED or
1 = absolute
haptic outputs is
setting
set
0–1
0 = increase
brightness
1= decrease
brightness
0–255
Defines whether
the brightness
value is increased
or decreased with
the BRGT value
BRGT output
value 0 100%
SET BRIGHTNESS with Variable Instruction
TABLE 20. SET BRIGHTNESS with Variable
Name
Variable
Value (d)
0–3
Description
0 = local variable A
1 = local variable B
2 = global variable
C
3 = I2C variable
register value or
general purpose
ADC value,
variable D
WAIT INSTRUCTION
When a wait instruction is executed, the engine is set in a wait status, and the brightness values on the outputs are frozen.
TABLE 21. WAIT
Name
Value (d)
0
Divide master
clock (32.768 Hz)
by 16 which
means 0.488 ms
cycle time
1
Divide master
clock (32 768 Hz)
by 512 which
means 15.625 ms
cycle time
1– 31
Total wait time will
be = (time) x
(prescale).
Maximum 484 ms,
minimum 0.488
ms
prescale
time
Description
LED MAPPING INSTRUCTIONS
These commands define the engine-to-LED mapping. The mapping information is stored in a table, which is stored in the SRAM
(program memory of the LM8502). Location of the mapping table can exist anywhere in SRAM. LM8502 has two lighting engines
(Engines) which can be mapped to 10 LED drivers or haptic driver freely. Each mapping takes one 16-bit instruction and a mapping
table consists of multiple mappings. The engines can use the same mapping table or have their own mapping table. Each of the
LED outputs or haptic output is mapped by following manner (note that this is also the way they are written into the SRAM memory):
These commands define the engine-to-LED mapping. The mapping information is stored in a table, which is stored in the SRAM
(program memory of the LM8502). Location of the mapping table can exist anywhere in SRAM. LM8502 has two lighting engines
(Engines) which can be mapped to 10 LED drivers or haptic driver freely. Each mapping takes one 16–bit instruction and a mapping
32
Copyright © 1999-2012, Texas Instruments Incorporated
LM8502
table consists of multiple mappings. The engines can use the same mapping table or have their own mapping table. Each of the
LED outputs or haptic output is mapped by following manner (note that this is also the way they are written into the SRAM memory):
TABLE 22. LED Mapping
Output
Value (dec) / (binary)
LED1
1 / 0000 0000 0000 0001
LED2
2 / 0000 0000 0000 0010
LED3
4 / 0000 0000 0000 0100
LED4
8 / 0000 0000 0000 1000
LED5
16 / 0000 0000 0001 0000
LED6
32 / 0000 0000 0010 0000
LED7
64 / 0000 0000 0100 0000
LED8
128 / 0000 0000 1000 0000
LED9
256 / 0000 0001 0000 0000
LED10
512 / 0000 0010 0000 0000
Haptic
1024 / 0000 0100 0000 0000
One mapping can control one or multiple LED outputs or haptic. In a case where multiple LED outputs or LED outputs and haptic
are mapped, one sets to '1' the applicable 'LED/haptic bit'. For example:
TABLE 23. Mapping Example
Mapped Outputs
Value (dec) / (binary)
LED1, LED3 and LED9
261 / 0000 0001 0000 0101
LED2, LED4, LED6, LED8, LED10 and haptic
1706 / 0000 0110 1010 1010
There are totally seven commands for the engine-to-LED driver control: mux_ld_start, mux_ld_end, mux_sel, mux_clr, mux_inc,
mux_dec, mux_set. Note that the LED mapping instructions do not update brightness values to LED outputs. Brightness values
are updated after ramp or set_brgt instructions.
MUX_LD_START; MUX_LD_END Instructions
Mux_ld_start and mux_ld_ end define the mapping table location in the memory. Mux_ld_start defines the start address, and
mux_ld_end indicates the end address of the mapping table. See .
MUX_SEL Instruction
With a mux_sel instruction one, and only one, LED driver can be connected to a lighting engine. Connecting multiple LEDs to one
engine is done with the mapping table. After the mapping has been released from an LED, the Brightness register value will still
control the LED brightness.
TABLE 24. MUX_SEL
Name
LED select
Value (d)
0 - 16
Description
0 = no drivers
selected
1 = LED1 selected
2 = LED2 selected
...
9 = LED9 selected
10 = LED10
selected
11 = haptic
MUX_CLR Instruction
Mux_clr clears engine-to-driver mapping. After the mapping has been released from an LED, the Brightness register value will still
control the LED brightness. See .
MUX_INC Instruction
Mux_inc instruction sets the next row active in the mapping table each time it is called. For example, if the 2nd row is active after
a mux_inc instruction call, the 3rd row will be active. If the mapping table end is reached, activation will roll to the mapping table
start address the next time the mux_inc instruction is called. The engine will not push a new brightness value to the LED driver
output before a SET_BRGT or RAMP instruction is executed. If the mapping has been released from an LED, the value in the
Brightness register will still control the LED brightness. See .
Copyright © 1999-2012, Texas Instruments Incorporated
33
LM8502
MUX_DEC Instruction
Mux_dec instruction sets the previous row active in the mapping table each time it is called. For example, if the 3rd row is active,
after mux_dec instruction call the 2nd row will be active. If the mapping table start address is reached, activation will roll to the
mapping table end address the next time the mux_dec instruction is called. The engine will not push a new brightness value to the
LED driver output before a SET_BRGT or RAMP instruction is executed. If the mapping has been released from an LED, the value
in the Brightness register will still control the LED brightness. See .
MUX_SET Instruction
Mux_set sets the index pointer to point to the mapping table row defined by bits [6:0] and sets the row active. The engine will not
push a new brightness value to the LED driver output before SET_BRGT or RAMP instruction is executed. If the mapping has been
released from an LED, the value in the Brightness register will still control the LED brightness. See .
GO-TO-START INSTRUCTION
Go-to-start command resets the Program Counter register; the program continues executing from the I2C register program start
address. Command takes sixteen 32 kHz clock cycles. Note that default value for all program memory registers is 00h, which is
the “Go-to-Start” command.
BRANCH
BRANCH Instruction
Branch instruction is mainly indented for repeating a portion of the program code several times. Branch instruction loads step
number value to program counter. The loop-count parameter defines how many times the instructions inside the loop are repeated.
The LM8502 supports nested looping, i.e., loop inside loop. The number of nested loops is not limited. Instruction takes sixteen 32
kHz clock cycles.
TABLE 25. BRANCH Instruction
Name
Value (d)
Description
loop count
0-63
The number of
loops to be done. 0
means an infinite
loop.
step number
0-95
The step number
to be loaded to
program counter
BRANCH Instruction with Variable
TABLE 26. BRANCH Instruction with Variable
Name
Value (d)
Description
step number
0-3
0 = local variable A
1 = local variable B
2 = global variable
C
3 = I2C variable
register value or
general purpose
ADC value,
variable D
Selects the
variable for step
number value.
Step number is
loaded with the
value of the
variable.
INT INSTRUCTION
Sends interrupt to processor by pulling the INT pin down and setting the corresponding status bit high. Interrupt can be cleared by
reading interrupt bits in STATUS/INTERRUPT register. With this instruction program execution continues.
END INSTRUCTION
Ends program execution and resets PC. Instruction takes sixteen 32 kHz clock cycles. End instruction can have two parameters,
INT and RESET. These parameters are described in tables below. Execution engine bits are set to zero, i.e., Hold mode.
34
Copyright © 1999-2012, Texas Instruments Incorporated
LM8502
TABLE 27. END Instruction
Name
Value
0
No interrupt will be
sent. PWM
registers values
will remain intact.
Program counter
value is set to 0.
1
Reset program
counter value to 0
and send interrupt
to processor by
pulling the INT pin
down and setting
corresponding
status bit high to
notify that program
has ended.
Brightness
register values will
remain intact.
Interrupt can be
cleared by reading
interrupt bits in
STATUS/
INTERRUPT
register
0
Reset program
counter value to 0
and hold.
Brightness
register values
remain intact.
1
Reset program
counter value to 0
and hold.
Brightness
register values of
the non-mapped
drivers will remain.
Brightness
register values of
the mapped
drivers will be set
to '0000 0000'.
int
reset
Description
TRIGGER INSTRUCTION
Wait or send triggers can be used to, e.g,. synchronize operation between the program execution engines. A send trigger instruction
takes sixteen 32 kHz clock cycles, and a wait for trigger takes at least sixteen 32 kHz clock cycles. The receiving engine stores the
triggers which have been sent. Received triggers are cleared by a wait-for-trigger instruction. A wait-for-trigger instruction is executed until all the defined triggers have been received. (Note: several triggers can be defined in the same instruction.) An external
trigger input signal must stay low for at least two 32 kHz clock cycles to be executed. Trigger output signal is three 32 kHz clock
cycles long. External trigger signal is active low, i.e. when trigger is send/received the pin is pulled to GND. Sent external trigger
is masked, i.e., the device which has sent the trigger will not recognize it. If send and wait external triggers are used on the same
instruction, the send external trigger is executed first, then the wait external trigger.
Copyright © 1999-2012, Texas Instruments Incorporated
35
LM8502
TABLE 28. TRIGGER Instruction
Name
Value (d)
wait for a trigger
send a trigger
Description
0 - 31
Wait for a trigger
from the engine
(s). Several
triggers can be
defined in the
same instruction.
Bit [7] engages
engine 1, bit [8]
engages engine 2,
and bit [6] is for
external trigger I/
O. Bits [4], [5] and
[9] are not in use.
0 - 31
Send a trigger to
the engine(s).
Several triggers
can be defined in
the same
instruction. Bit [1]
engages engine 1,
bit [2] engages
engine 2, and bit
[6] is for external
trigger I/O. Bits [3],
[4] and [5] are not
in use.
CONDITIONAL INSTRUCTIONS
The LM8502 includes the following conditional jump instructions: jne (jump if not equal), jge (jump if greater or equal), jl (jump if
less) and je (jump if equal). If the condition is true, a certain number of instructions will be skipped (i.e,. the program jumps forward
to a location relative to the present location). If condition is false, then the next instruction will be executed.
TABLE 29. Conditional Instruction
Name
Number of instructions to be skipped if the
operation returns true
Value (d)
Description
0–31
The number of instructions to be skipped
when statement is true. Note: value 0
means redundant code
0–3
0 = local variable A
1 = local variable B
2 = global variable C
3 = I2C variable register value or general
purpose ADC value, variable D
0–3
0 = local variable A
1 = local variable B
2 = global variable C
3 = I2C variable register value or general
purpose ADC value, variable D
variable 1
variable 2
36
Copyright © 1999-2012, Texas Instruments Incorporated
LM8502
ARITHMETIC INSTRUCTIONS
LD
This instruction is used to assign a value into a variable; the previous value in that variable is overwritten. Both engines have two
local variables called A and B. The variable C is a global variable for both engines.
TABLE 30. Assign Value to Variable
Name
Value (d)
target variable
8–bit value
Description
0–2
0 = variable A
1 = variable B
2 = variable C
0–255
Variable value
ADD
Operator either adds 8-bit value to the current value of the target variable, or adds the value of variable 1 (A, B, C or D) to the value
of variable 2 (A, B, C or D) and stores the result in the register of variable A, B or C. Variables overflow from 255 to 0.
TABLE 31. ADD with Numerical Operands
Name
Value (d)
target value
0–2
8–bit value
0–255
Description
0 = variable A
1 = variable B
2 = variable C
The value to be added
TABLE 32. ADD with Variables
Name
Value (d)
target value
variable 1
variable 2
Description
0–2
0 = variable A
1 = variable B
2 = variable C
0–3
0 = local variable A
1 = local variable B
2 = global variable C
3 = I2C variable register value or general
purpose ADC value, variable D
0–3
0 = local variable A
1 = local variable B
2 = global variable C
3 = I2C variable register value or general
purpose ADC value, variable D
SUB
Operator either subtracts 8-bit value to the current value of the target variable, or subtracts the value of variable 1 (A, B, C or D)
to the value of variable 2 (A, B, C or D) and stores the result in the register of variable A, B or C. Variables overflow from 255 to 0.
TABLE 33. SUB with Numerical Operands
Name
Value (d)
target value
0–2
8–bit value
0–255
Copyright © 1999-2012, Texas Instruments Incorporated
Description
0 = variable A
1 = variable B
2 = variable C
The value to be subtracted
37
LM8502
TABLE 34. SUB with variables
Name
target value
variable 1
variable 2
Value (d)
Description
0–2
0 = variable A
1 = variable B
2 = variable C
0–3
0 = local variable A
1 = local variable B
2 = global variable C
3 = I2C variable register value or general
purpose ADC value, variable D
0–3
0 = local variable A
1 = local variable B
2 = global variable C
3 = I2C variable register value or general
purpose ADC value, variable D
HAPTIC FEEDBACK
The LM8502 can be set to Haptic Feedback mode, where the FLASH1/VIBRAP and FLASH2/VIBRAN pins can be used for driving
a vibra motor. The device incorporates H-bridge which is controlled with a PWM generator. The PWM generator can be controlled
through writing I2C registers or lighting engines or through grouping haptic into one of the group faders. PWM frequency can be
selected with 2 bits (bits [4:3] in the Haptic Feedback Control register 21H) in the following manner: 00 = 157 Hz, 01 = 490 Hz, 10
= 980 Hz, 11 = 3.9 kHz. PWM has 8-bit resolution. Different haptic modes can be selected according to Table 36.
These different modes control the direction of vibra motor. The PWM control sets the speed of the motor. See Figure 13 and Table
35 below.
1. In mode 000 the haptic is disabled.
2. In mode 001 there is PWM on both A and B channels. The frequency of the PWM is double the frequency set in register 21H
Haptic control 2. When the PWM value is 00H the B-channel is fully on, the A-channel is off, and the motor is running clockwise.
Increasing the PWM value increases the A-channel pulse length and decreases B-channel pulse length. In the middle of the
PWM range (value 80H) both channels PWM have the same pulse length so that the motor is stopped. When the PWM reaches
value FFH, the A channel is fully on, the B channel is off and motor is running counterclockwise.
3. In mode 010 the PWM register controls the A-channel; B-channel is in low state (off) all the time. Increasing the PWM increases
the motor speed. The motor is running counter clockwise.
4. In mode 011 the PWM register controls the B-channel; A-channel is in low state (off) all the time. Increasing the PWM increases
the motor speed. The motor is running clockwise.
5. In mode 100 the haptic is disabled.
6. In mode 101 the PWM is on both channels. The functionality is the same as in mode 001 with one exception. In the middle
PWM value (80H) there is no activity on either of the channels. This is to save power in the middle value.
7. In mode 110 the PWM register controls the A-channel; B-channel is in high state (on) all the time. With PWM value 00H the
motor is running at full speed. Increasing the PWM value reduces the motor speed. Motor is running clockwise.
8. In mode 111 the PWM register controls the B-channel; A-channel is in high state (on) all the time. With PWM value 00H the
motor is running at full speed. Increasing the PWM reduces the motor speed. Motor is running counter-clockwise.
30078797
FIGURE 13. Basic Idea of H-Bridge
38
Copyright © 1999-2012, Texas Instruments Incorporated
LM8502
TABLE 35. H-Bridge Truth Table
PFET Left Achannel
NFET Left Achannel
PFET Right B-channel
N-fet Right Bchannel
Operation of the motor
On
Off
Off
On
Motor goes Clockwise
Off
On
On
Off
Motor goes Counter-Clockwise
On
Off
On
Off
Motor 'brakes'
Off
On
Off
On
Motor 'brakes'
TABLE 36. Haptic Modes
HAPT_SEL_MODE[2:0]
Description
000
Haptic disabled
001
PWM to both channels (2*pwm_freq)
010
PWM on A channel, B channel in low state
011
PWM on B channel, A channel in low state
100
Haptic disabled
101
PWM to both channels, no activity at center value (2*pwm_freq)
110
PWM on A channel, B channel in high state
111
PWM on B channel, A channel in high state
Haptic can be controlled with the lighting engines also. Haptic is mapped to the engines like LED outputs with mapping tables of
with mux_sel instruction. All the instructions work the same with haptic as with the LED outputs. One must take into account which
haptic mode is selected, since the haptic mode cannot be changed with the engines, but only from registers with I2C.
Haptic can be used also instead of the PWM input. This enables, for example, the use of lighting engines with ALS or PWM control
directly from register. Haptic is selected instead of PWM input by setting bit [1] in register 36H PWM_INPUT_SEL to '0'. When in
Haptic mode there is a one-second wait before going to Power-save mode. This allows the vibra motor to stop without causing any
issues to the LM8502.
During haptic operation boost is set to Constant Voltage mode (selectable 4.5V or 5.0V).
30078776
FIGURE 14. Haptic PWM Control
Copyright © 1999-2012, Texas Instruments Incorporated
39
LM8502
AMBIENT LIGHT SENSING
The LM8502 incorporates an Ambient Light Sensing (ALS) input interface which translates an analog output of ambient light sensor,
to a user specified brightness level. In LM8502 there are two ALS inputs. One is dedicated solely to ambient light sensing (ALS1),
the other is multiplexed with LED output 10 (ALS2). Note that when ALS2 is in use LED output D10 cannot be enabled. If the two
ALS inputs are selected, the ALS input functionality can be defined with two bits in ALS Control register 11H as described in Table
37.
30078790
FIGURE 15. Ambient Light Sensing
TABLE 37. Ambient Light Sensor Input Functionality
ALS_SEL
[1:0]
Function
00
The lowest of ALS1 or ALS2 is the ambient
light sensor input
01
ALS1 is the ambient light sensor input
10
ALS2 is the ambient light sensor input
11
The highest of ALS1 or ALS2 is the ambient
light sensor input
ALS is designed so that it controls the LED outputs through the group controls. LED outputs, which should be controlled by the
ambient light sensing, need to be grouped into one of the three groups. There is an enable for each group that selects whether the
ALS affects a certain group or not. For example, one group of LED outputs may be controlled by ALS along, another by ALS and
PWM, and the third group may be controlled only from the Group Fader register (ALS or PWM having no effect on this group).
Each group fader register value scales the ALS input. This enables different brightness levels for different groups. After ALS input
is multiplied with group scaling it is multiplied with PWM control (if the PWM is selected for the group). The control for PWM can
come from the external PWM input pin or from the lighting engines. When PWM control comes from the lighting engines, the Haptic
outputs cannot be used. After ALS input is multiplied with PWM control it is mapped into LED outputs. (See the ALS sensing flow
in Figure 16.) The Ramp control manages LED current-level transitions from one desired brightness code to the next, as described
in the section regarding Group Fader Control.
40
Copyright © 1999-2012, Texas Instruments Incorporated
LM8502
TABLE 38. Ambient Light Truth Table: How ALS and PWM Enables Affect Group of LED Outputs
Grouping
no
ALS_en
PWM_en
Current value mapped to LED outputs
works only when LED outputs works only when LED outputs LED outputs controlled through register or lighting
grouped
grouped
engine
yes
no
no
Group current control
yes
yes
no
Group current x ALS
yes
no
yes
Group current x PWM
yes
yes
yes
Group current x ALS x PWM
ALS is controlled with the ALS_en_G1, ALS_en_G2 and ALS_en_G3 bits. Setting one of these bits to ‘1’ turns on the ALS circuitry.
The LM8502 incorporates internal resistors for scaling ambient light sensor currents. This enables the use of different sensors and
also the high impedance state when device is in standby, which saves energy. Note that the internal resistor value is the same for
both of the ambient light inputs, which means that when using both ALS inputs sensors must be the same. Use of an external
resistor is also possible. When an external resistor is used the en_ext_res bit should be set to ‘1’. When en_ext_res is set to ‘0’,
the internal resistor is selected with the als_res_sel[1:0] bits. see Table 39.
TABLE 39. Ambient Light Resistor Selection
EN_EXT_RES
ALS_RES_SEL[1:0]
Resistor value (kOhm)
0
00
1.25
0
01
2.5
0
10
5
0
11
10
1
X (don't care)
external resistor
30078779
Ambient Light Sensing and Target Light Calculation
Copyright © 1999-2012, Texas Instruments Incorporated
41
LM8502
30078788
Ambient Light Calculation
42
Copyright © 1999-2012, Texas Instruments Incorporated
LM8502
30078789
Dynamic Backlight Control
FIGURE 16. Ambient Light Sensing Functionality
The ALS circuit has four programmable thresholds which define five ambient brightness zones. The Zline0 – Zline3 and Z0 Target
Light – Z4 Target Light registers control the user-selectable thresholds and brightness levels for the different zones. It is also
possible to set the start value from which the ALS starts when enabled. ALS start zone can be selected with 3 bits in
ALS_START_VALUE control register 1BH, as shown in Table 40to following table . ALS start zone will be taken after startup or
after power-save. ALS zone data is readable from register 97H.
When ALS has changed from zone to another, the ALS_ZONE_CHANGE bit in the STATUS/INTERRUPT register (3AH) is set to
'1'. Reading this register clears the bit. When an interrupt is wanted from ALS zone, the MASK_ALS_ZONE_INT bit in MISC register
(36H), must be set to '0'. This bit is '1' by default. When this bit it set to '0' ALS gives interrupt when zone changes, and INT output
will go to into a low state. Read-back of the Status/Interrupt register will cause the INT output to go to a high state.
Copyright © 1999-2012, Texas Instruments Incorporated
43
LM8502
TABLE 40. ALS Start Zone Selection
zone_start[2:0]
ALS start value
000
Zone 0 target value
001
Zone 1 target value
010
Zone 2 target value
011
Zone 3 target value
100
Zone 4 target value
101
ALS remembers last value after power-save
110
ALS remembers last value after powe—r-save
111
ALS remembers last value after power-save
The ambient light sensor input has a 0 to 1V operational input voltage range. The voltage at ALS1 or ALS2 is compared with the
8-bit values programmed into the Zline0-Zline3 registers. When the ambient light sensor output crosses one of the Zline0 – Zline3
programmed thresholds, the internal ALS circuitry will smoothly transition the LED current to the new 8-bit brightness level as
programmed into the Z0 target light – Z4 target light registers. The averaging time for ALS to be configured with 3 bits in ALS control
register 11H is described in following table . The averaging time is designed to remove fast changes in lighting conditions.
TABLE 41. ALS Averaging Time Selection
AVGT[2:0]
Average time (ms)
000
4
001
8
010
16
011
32
100
64
101
128
110
256
111
512
30078782
FIGURE 17. Ambient Light Mapping Into Target Lights
TABLE 42. Zline 0 (Threshold 0 Select)
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
Data
Data
Data
Data
Data
Data
Data
Data
TABLE 43. Zline 1 (Threshold 1 Select)
44
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
Data
Data
Data
Data
Data
Data
Data
Data
Copyright © 1999-2012, Texas Instruments Incorporated
LM8502
TABLE 44. Zline 2 (Threshold 2 Select)
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
Data
Data
Data
Data
Data
Data
Data
Data
TABLE 45. Zline 3 (Threshold 3 Select)
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
Data
Data
Data
Data
Data
Data
Data
Data
TABLE 46. Z0 Target Light (Brightness Translation 1)
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
1
Data
Data
Data
Data
Data
Data
Data
TABLE 47. Z1 Target Light (Brightness Translation 2)
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
1
Data
Data
Data
Data
Data
Data
Data
TABLE 48. Z2 Target Light (Brightness Translation 3)
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
1
Data
Data
Data
Data
Data
Data
Data
TABLE 49. Z3 Target Light (Brightness Translation 4)
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
1
Data
Data
Data
Data
Data
Data
Data
TABLE 50. Z4 Target Light (Brightness Translation 5)
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
1
Data
Data
Data
Data
Data
Data
Data
GENERAL PURPOSE ADC
LM8502 has a built-in analog-to-digital converter (ADC) that can be used, for example, for LED error detection or sensor input for
the lighting engines. The general purpose ADC provides an opportunity to measure the forward voltages of the LED outputs as
well as flash outputs and Indicator LED Output. Voltage on ALS1 input, boost converter output voltage VOUT and voltage in INT pin
can also be measured with the ADC. The ADC is activated by serial interface write and the result can be read through the serial
interface during the next cycle. Table 51 describes how to select correct output to be measured.
One can also connect some sensors or audio input for getting sensor or audio synchronization information into lighting engines via
ADC. Values from ADC to lighting engines are passed with variables. The ADC can convert positive signals from 0 to 5V.
TABLE 51. General Purpose ADC Conversion Table
adc_test_ctrl[4:0]
ADC Output
00000
LED Output 1
00001
LED Output 2
00010
LED Output 3
00011
LED Output 4
00100
LED Output 5
00101
LED Output 6
00110
LED Output 7
00111
LED Output 8
01000
LED Output 9
01001
LED Output 10
01010
FLASH Output 1
01011
FLASH Output 2
Copyright © 1999-2012, Texas Instruments Incorporated
45
LM8502
01100
Indicator LED Output
01101
Not used
01110
Not used
01111
VOUT
10000
ALS1 input
10001
INT pin
10010 – 11111
Not used
THERMAL SHUTDOWN
When the LM8502's die temperature reaches +150°C, the boost converter shuts down and the NFET and PFET turn off. Additionally,
both flash sources (FLASH1 and FLASH2) turn off. When the thermal shutdown threshold is tripped a '1' is written to bit [1] of the
Flag register (Thermal Shutdown bit). The LM8502 will start up again when the die temperature falls to below +135°C.
During heavy load conditions when the internal power dissipation in the device causes thermal shutdown, the part will turn off and
start up again after the die temperature cools down. This will result in a pulsed on/off operation.
PWM/ENVM/TX2 PIN
The PWM/ENVM/TX2 pin can be configured as a PWM input, as an external voltage mode enable, or as a power amplifier synchronization. PWM input can be enabled from register 3BH bit [0]. Setting this bit to '0' enables PWM and disables ENVM/TX2.
TABLE 52. PWM Configuration
INT_pin configuration
PWM_CONFIG (bit [0] register 3BH
PWM input enabled, ENVM/TX2 disabled
0
PWM input disabled, ENVM/TX2 enabled
1
When the PWM input is enabled the LED current becomes a function of the code in the group brightness register and the duty
cycle at PWM. The PWM input accepts a logic level input with selectable minimum frequencies of 100 Hz, 500 Hz, 1 kHz, and 5
kHz. Internal filtering of the PWM input frequency converts the duty cycle information to an average control signal which directly
controls the LED current. Table 53 displays latency information for different PWM minimum frequency selections. Minimum frequency can be selected from DBC control register 1DH.
TABLE 53. PWM Frequency Control
pwm_min_freq control (Hz)
Latency, PWM (100% to 0%), ms
Latency, PWM (0% to 100%), ms
100
13.6
12.2
500
3
2.9
1000
1.7
1.7
5000
0.45
0.7
The PWM input is designed so that it works through the group controls. LED outputs, which should be controlled by the PWM, need
to be grouped into one of the three groups. There is an enable for each group that selects whether the PWM affects a certain group
or not. One group of LED outputs could be affected by PWM whereas another might only be controlled from a group fader register.
After the PWM input is multiplied with the group brightness setting, and possibly also with the ALS0, it is mapped into LED outputs.
ENVM and TX2 are explained in more detail in the Flash section.
INT PIN
The INT pin is used for informing the microcontroller when a lighting sequence is finished, when ALS changes zone, or when the
general purpose ADC has finished its measurement. The INT signal is active low, i.e., when an interrupt signal is sent, and the pin
is pulled to GND. The INT pin can be configured with bit [1] in register 3BH. Setting this bit to '0' enables the INT; setting it to '1'
connects the INT to the general purpose ADC. An external pull-up resistor is needed for proper functionality.
TRIG PIN
The TRIG pin can function as an external trigger input or output. External trigger signal is active low when a trigger is sent or
received, and the pin is pulled to GND. TRIG is an open-drain pin, and an external pull-up resistor is needed for trigger line. An
external trigger input signal must be at least two 32 kHz clock cycles long to be recognized. The trigger output signal is three 32
kHz clock cycles long. If TRIG pin is not used on application, it should be connected to GND to prevent floating of this pin and extra
current consumption.
CLK PIN
The CLK pin is used for connecting an external 32 kHz clock to the LM8502. Using an external clock can improve automatic Powersave mode efficiency because the internal clock can be switched off automatically when device has entered Power-save mode and
an external clock is present. The device can be used without an external clock. If an external clock is not used on the application,
the CLK pin should be connected to GND to prevent floating of this pin and extra current consumption.
46
Copyright © 1999-2012, Texas Instruments Incorporated
LM8502
POWER SAVING
The LM8502 includes Power-save mode which allows lower current consumption when the device is not active. Additional power
can be saved using an external 32 kHz clock input. Automatic Power-save mode is enabled when the POWERSAVE_EN bit in
register is ‘1’. Almost all analog blocks are powered down in Power-save if an external clock signal is used. Only the protection
circuits remain active. However, if the internal clock has been selected, only the boost converter and LED drivers are disabled
during the power-save; the digital part of the LED controller needs to stay active. During the program execution the LM8502 can
enter Power-save if there is no activity in any of the LED driver outputs. To prevent short power-save sequences during program
execution, the device has an instruction look-ahead filter. During program execution engine 1 and engine 2 instructions are constantly analyzed, and if there are time slots with no activity on LED driver outputs for 50 ms, the device will enter Power-save. In
Power-save mode program execution continues uninterruptedly. When an instruction that requires activity is executed, a fast internal startup sequence will be started automatically.
30078778
FIGURE 18. The Effect of Power-Save Mode During a Lighting Sequence
BOOST CONVERTER
The LM8502 has a 2 MHz fixed-frequency synchronous boost converter. The boost converter has two modes: Constant Voltage
Output mode and Adaptive Voltage mode. On startup, when VOUT is less than VIN, the internal synchronous PFET turns on as a
current source and delivers 350 mA (typ.) to the output capacitor. During this time all LED outputs are off. When the voltage across
the output capacitor reaches 2.2V, the LED outputs can turn on.
Constant Voltage Output Mode
In Constant Voltage Output mode the LM8502 operates as a voltage output boost converter with selectable output voltages of 4.5V
and 5V. In Constant Voltage Output mode the LM8502 is able to deliver up to 5W of output power.
Constant Voltage Output mode is enabled by Bit 2 (VM) of the Torch Brightness register or Flash Brightness register, with the
ENVM input or with the EN_HAPTIC bit. Write a '1' to bit [1] of Configuration Register 1 to set VOUT to 5V. Write a '0' to this bit to
set VOUT to 4.5V. In Constant Voltage Output mode the flash LED current sources continue to operate; however, the difference
between VOUT and VLED will be dropped across the current sources. In Constant Voltage Output mode when VIN is greater than
VOUT, the LM8502 operates in Pass mode.
Adaptive Voltage Mode
In Adaptive Voltage mode the adaptive boost control is enabled, and the output voltage is kept at optimum level. When the flash
outputs are on, and if the output voltage is greater than VIN – 150 mV, the PWM converter switches and maintains at least 300 mV
across flash LED outputs.
When flash LEDs are not on, the converter maintains at least 70 mV across the low-side LED outputs. Converter voltage is raised
in steps from 3.125V up to 5V in 125 mV steps to ensure that the LED outputs remain in regulation. When the input voltage rises
above the LED voltage + headroom voltage, the device operates in Pass mode.
Copyright © 1999-2012, Texas Instruments Incorporated
47
LM8502
When flash and low-side LED outputs are both on, starting level and maximum level for the voltage-over-flash LED driver can be
defined. These levels are defined in register 35H according to following table:
TABLE 54. Adaptive Flash Control Register 35H
FLASH_START[7:4]
FLASH_MAX[3:0]
Voltage-over-flash LED driver (mV)
0000
0000
300
0001
0001
400
0010
0010
500
0011
0011
600
0100
0100
700
0101
0101
800
0110
0110
900
0111
0111
1000
1000
1000
1100
1001
1001
1200
1010
1010
1300
1011
1011
1400
1100
1100
1500
1101
1101
1600
1110
1110
1700
1111
1111
1800
PASS MODE
If the difference between VOUT and VLED is greater than 300 mV the device operates in Pass mode. In Pass mode the boost converter
stops switching and the synchronous PFET turns fully on bringing VOUT up to VIN – IIN × RPMOS (RPMOS = 150mΩ). In Pass mode
the inductor current is not limited by the peak current limit. In this situation the output current must be limited to 2.5A.
If the device is operating in Pass mode, and VIN drops to a point that forces the device into switching, the LM8502 will make a onetime decision to jump into Switching mode. The LM8502 remains in Switching mode until the device is shut down and re-enabled.
This is true even if VIN were to rise back above VFLASH LED + 300 mV . This prevents the LED current from oscillating when VIN is
operating close to VOUT.
LIGHT LOAD
At light loads, whether in Constant Voltage mode or Adaptive Voltage mode, the PWM switching converter changes over to a pulsed
frequency regulation scheme (light-load comparator enabled) and only switches as necessary to ensure proper LED current or
output voltage regulation. This allows for improved light load efficiency compared to converters that operate in fixed frequency
PWM mode at all load currents. In this mode the device will only switch as necessary to maintain VOUT within regulation. This mode
provides a better efficiency due to the reduction in switching losses which become a larger portion of the total power loss at light
loads.
Configuration Register 1 bit [0] = 1 disables the light-load comparator. With this bit set to '0' (default) the light load comparator is
enabled. When flash LEDs are enabled the light load comparator is always disabled. When the light load comparator is disabled
the LM8502 will operate at a constant frequency down to ILOAD = 0. Disabling light load can be useful when a more predictable
switching frequency across the entire load current range is desired.
OVER-VOLTAGE PROTECTION
The output voltage is limited to typically 5.6V (5.7V max). In situations such as when the current source is open, the LM8502 will
raise the output voltage in order to try to keep the LED current at its target value. When VOUT reaches 5.6V the over-voltage
comparator will trip and turn off both the internal NFET and PFET. When VOUT falls below 5.4V the LM8502 will begin switching
again. Note that over-voltage protection is not in use in Pass mode.
CURRENT LIMIT
The LM8502 features 4 selectable current limits 1A, 1.5A, 2A, and 2.5A. These are controlled through the I2C-compatible interface
via bits [6:5] of the Flash Duration register. When the current limit is reached the LM8502 stops switching for the remainder of the
switching cycle.
Since the current limit is sensed in the NMOS switch there is no mechanism to limit the current when the device operates in Pass
mode. In situations where there could potentially be large load currents at OUT, and the LM8502 is operating in Pass mode, the
load current must be limited to 2.5A. In Boost mode or Pass mode, if VOUT falls below approximately 2.3V, the part stops switching,
and the PFET operates as a current source limiting the current to typically 350 mA. This prevents damage to the LM8502 and
excessive current draw from the battery during output short circuit conditions.
MAXIMUM OUTPUT POWER
Output power is limited by three things: the peak current limit, the ambient temperature, and the maximum power dissipation in the
package. If the LM8502 ’s die temperature is below the absolute maximum rating of +125°C, the maximum output power can be
48
Copyright © 1999-2012, Texas Instruments Incorporated
LM8502
over 6W. However, any additional output current will cause the internal power dissipation to increase and, therefore increase the
die temperature. This can be additionally compounded if the flash LED current sources are operating since the difference between
VOUT and VLED is dropped across the current sources. Any circuit configuration must ensure that the die temperature remains below
+125°C taking into account the ambient temperature derating.
The above formulas consider the average current through the NFET and PFET. The actual power losses may be higher due to the
RMS currents and the quiescent power. This equation, however, gives a decent approximation.
FLASH
30078784
FIGURE 19. Flash Functionality
Flash Startup
Turn on of the flash in the LM8502 is done through bits [2:0] of the Torch Brightness register (A0H), bits [2:0] of the Flash Brightness
register (B0H), or by pulling the STROBE pin high. Bits [1:0] of the Torch Brightness register or Flash Brightness register set the
current sources into Flash = '11', Torch = '10' or Indicator = '01' mode (outputs FLASH1, FLASH2, and LEDI). At turn-on the current
sources step through each level until the target LED current is reached (16 µs/step). This gives the device a controlled turn-on and
limits inrush current from the VIN supply.
TABLE 55. Flash Modes
EN1 and EN0 bits in Registers A0H or B0H
Flash Mode
00
Flash Shutdown
01
Indicator Mode
10
Torch Mode
11
Flash mode
Copyright © 1999-2012, Texas Instruments Incorporated
49
LM8502
TABLE 56. Flash Registers
Register
Bit [7]
Bit [6]
TORCH BRIGHTNESS INDICATOR LED
A0H
CURRENT
Bit [5]
FLASH CURRENT
FLASH DURATION
C0H
CURRENT LIMIT
CONFIG REGISTER 1 TX1/
E0H
TORCH
NTC FLAG
TX2
POLARIT
Y
CONFIG REGISTER 2 UVLO_LEVEL
F0H
Bit [3]
TORCH CURRENT
FLASH BRIGHTNESS STR
B0H
FLAG REGISTER D0H UVLO
FLAG
Bit [4]
Bit [2]
Bit [1]
Bit [0]
VM
EN1
EN0
VM
EN1
EN0
FLASH TIMEOUT
TX2 FLAG TX1 FLAG
FLASH
TSD FLAG FLAHS
LED FAULT
TIMEOUT
FLAG
TX2_PIN_C NTC_HYS LEDI_NTC
ONFIG
T
DIS_EXT_
STROBE
VM_VALU DIS_PFM
E
EN_UVLO
AET_MOD
E
NTC_MOD TX2
E
SHUTDOW
N
EN_NTC_ UVLO_MO
INTERRU DE
PT
Flash Mode
In Flash mode the LED current sources (FLASH1 and FLASH2) each provide 16 different current levels from 37.5 mA to 600 mA
in steps of 37.5 mA (see Table 57). The Flash currents are adjusted by writing to bits [6:3] of the Flash Brightness register, and
Flash mode is enabled by writing '11' to Torch Brightness register or Flash Brightness register bits [1:0].
TABLE 57. Flash Currents
Flash Current Bits [6:3] in Register B0H
Flash Current (mA)/Output
0000
37.5
0001
75
0010
112.5
0011
150
0100
187.5
0101
225
0110
262.5
0111
300
1000
337.5
1001
375
1010
412.5
1011
450
1100
487.5
1101
525
1110
562.5
1111
600
Flash Timeout
The Flash Timeout period sets the amount of time that the Flash Current is being sourced from current sources FLASH1 and
FLASH2. Bits [4:0] of the Flash Duration register set the Flash Timeout period. There are 32 different Flash Timeout levels in steps
of 32 ms giving a Flash Timeout range of 32 ms to 1024 ms. When timeout expires before Flash pulse is terminated, the
FLASH_TIME_OUT bit in Flag Register D0H is set to '1'. This flag is reset to '0' by pulling EN pin low, removing power from the
LM8502, or when the next Flash pulse is triggered.
Torch Mode
In Torch mode the current sources FLASH1 and FLASH2 each provide 8 different current levels. (See Table 58). The Torch currents
are adjusted by writing to bits [5:3] of the Torch Brightness register. Torch mode is activated by setting Torch Brightness register
or Flash Brightness bits [1:0] to '10'. Once the Torch mode is enabled the current sources will ramp up to the programmed Torch
current level by stepping through all of the Torch currents at (16 µs/step) until the programmed Torch current level is reached.
50
Copyright © 1999-2012, Texas Instruments Incorporated
LM8502
TABLE 58. Torch Currents
Torch Current Bits [5:3] in Register A0H
Torch Current (mA)/Output
000
18.75
001
37.5
010
56.25
011
75
100
93.75
101
112.5
110
131.25
111
150
STROBE
Bit [7] of the Flash Brightness register (STR bit) determines how the Flash pulse terminates. With the STR bit = 1 the Flash current
pulse will only terminate by reaching the end of the Flash Timeout period. With STR = 0, Flash mode can be terminated by pulling
STROBE low, programming bits [1:0] of the Torch Brightness register, or the Flash Brightness register to '00', or by allowing the
Flash Timeout period to elapse. If STR = 0, and STROBE is toggled before the end of the Flash Timeout period, the Timeout period
resets on the rising edge of STROBE. See LM8502 Timing Diagrams regarding the Flash pulse termination for the different STR
bit settings.
After the Flash pulse terminates, either by a flash timeout, pulling STROBE low, or disabling it via the I2C-compatible interface,
FLASH1 and FLASH2 turn completely off. This happens even when Torch is enabled via the I2C-compatible interface, and the
Flash pulse is turned on by toggling STROBE. After a Flash event ends the EN1 and EN0 bits (bits [1:0] of the Torch Brightness
register or Flash Brightness register) are automatically re-written with '00'.
Power Amplifier Synchronization (TX1)
The TX1/TORCH input has a dual function. When Configuration register 1 bit [7] = 0 (default), EOH TX1/TORCH is a power amplifier
synchronization input. This is designed to reduce the current pulled from the battery during an RF power amplifier transmit event.
When the LM8502 is engaged in a Flash event, and the TX1/TORCH pin is pulled high, both FLASH1 and FLASH2 are forced into
Torch mode at the programmed Torch current setting. If the TX1/TORCH pin is then pulled low before the Flash pulse terminates,
the LED current will ramp back to the previous Flash current level. At the end of the Flash timeout, whether the TX1/TORCH pin
is high or low, the LED current will turn off.
When Configuration Register 1 bit [7] = 1, TX1/TORCH is configured as a hardware Torch mode enable. In this mode a high at
TX1/TORCH turns on the LED current sources in Torch mode. TX1/TORCH will take precedence over the STROBE input and
Flash/Torch bit settings of the Torch Brightness register bits [1:0] and the Flash Brightness register bits [1:0].
The TX1 interrupt flag (bit [3]) indicates a TX event on the TX1/TORCH pin. Bit [3] will read back a '1' if TX1/TORCH is in TX1
mode, and the pin has changed from low to high since the last read of the Flag register. A read of the Flag Register automatically
resets this bit.
PWM/ENVM/TX2
The PWM/ENVM/TX2 input has three functions. (See above for explanation of PWM function.) ENVM/TX2 can be enabled from
bit [0] of register 3BH. Setting this PWM_CONFIG bit to '1' disables PWM and enables ENVM/TX2.
In ENVM mode (Configuration register 1 bit [5] = 0) the ENVM/TX2 pin is an active high-logic input that forces the LM8502 into
Voltage Output mode. In TX2 mode (Configuration Register 1 bit [5] = 1) the ENVM/TX2 pin is a power amplifier synchronization
input that forces the LM8502 from Flash mode into Torch mode.
In TX2 mode, when Configuration Register 1 bit [6] = 0 the ENVM/TX2 input is an active low-transmitinterrupt input. When Configuration Register 1 bit [6] = 1 the ENVM/TX2 input is an active high-transmit interrupt. Under this condition when the LM8502 is
engaged in a Flash event, and ENVM/TX2 is pulled low (bit = 0) or high (bit = 1), both FLASH1 and FLASH2 are forced into either
Torch mode or LED shutdown, depending on the logic state of Configuration Rregister 2 bit [0]. After a TX2 event, if the ENVM/
TX2 input is disengaged, and the TX2 Shutdown bit is set to force Torch mode, the LED current will ramp back to the previous
Flash current level. If the TX2 shutdown bit is programmed to force LED shutdown at a TX2 event, the Flag register must be read
to resume normal LED operation.
The TX2 interrupt flag (bit [4]) indicates a TX event on the ENVM/TX2 pin. Bit [4] will read back a '1' if ENVM/TX2 is in TX2 mode,
and the pin has had a TX event since the last read of the Flag register. A read of the Flag Register automatically resets this bit.
Indicator LED/Thermistor (LEDI/NTC)
The LEDI/NTC pin serves a dual function, either as an LED indicator driver or as a threshold detector for a negative temperature
coefficient (NTC) thermistor.
LED Indicator Mode (LEDI)
LEDI/NTC is configured as an LED indicator driver by setting Configuration register 1 bit [3] = '0' and Torch Brightness register or
Flash Brightness register bits [1:0] = '01'. In Indicator mode there are 4 different current levels available (2.3 mA, 4.6 mA, 7.9 mA,
9.2 mA). Bits [7:6] of the Torch Brightness register set the 4 different indicator current levels.
Copyright © 1999-2012, Texas Instruments Incorporated
51
LM8502
Thermal Comparator Mode (NTC)
Writing a '1' to Configuration register 1 bit [3] disables the indicator current source and configures the LEDI/NTC pin as a detector
for a NTC thermistor. In this mode the LEDI/NTC becomes the negative input of an internal comparator with the positive input
internally connected to a reference (VTRIP = 1V). Additionally, Configuration register 2 bit [1] determines what action the device
takes if the voltage at LEDI/NTC falls below VTRIP (while the device is in NTC mode). With Configuration register 2 bit [1] = 0, the
LM8502 will be forced into Torch mode when the voltage at LEDI/NTC falls below VTRIP. With Configuration register 2 bit [1] = 1
the device will shut down the current sources when VLEDI/NTC falls below VTRIP. Two software-selectable hysteresis levels are
available for NTC mode. Configuration register 1 Bit [4] = 0 selects 125 mV of hysteresis. When this bit is set to 1 there is 250 mV
of hysteresis in NTC mode.
The NTC flag bit [5] of the Flag Register reads back a '1' if the LM8502 is active in Flash or Torch mode, the device is in NTC mode,
and the voltage at LEDI/NTC has fallen below VTRIP. When this has happened, and the LM8502 has been forced into Torch or LED
shutdown (depending on the state of Configuration Register 2 bit [1]), the Flag Register must be read, and the voltage at the LEDI/
NTC pin goes above VTRIP + hysteresis in order to place the device back in normal operation. For example, if the NTC mode has
been selected (Configuration Register 1 bit [3] = 1) and programmed to force Torch mode while the device is flashing during an
NTC event, the LEDs will then be forced into Torch mode. Until the Flag Register is read back, the LEDs will only be able to flash
at the programmed Torch current level. On the other hand, if LED shutdown is selected, the LEDs will remain off regardless of the
state of the LED enable bits and STROBE until the Flag Register is read back.
Alternative External Torch Mode
Configuration Register 2 bit [2] programs the LM8502 for Alternative External Torch mode. With this bit set to '0' (default), TX1/
TORCH is a transmit interrupt that forces Torch mode only during a Flash event. For example, if TX1/TORCH goes high during a
Flash event, the LEDs will be forced into Torch mode only for the duration of the timeout counter. At the end of the timeout counter
the LEDs will turn off.
With Configuration Register 2 bit [2] set to '1' the operation of TX1/TORCH depends on STROBE. In this mode if TX1/TORCH goes
first, and then STROBE goes high, the LEDs are forced into Torch mode with no timeout. If TX1/TORCH goes high after STROBE
has gone high, then the TX1/TORCH pin operates as a normal TX interrupt, and the Flash LEDs will turn off at the end of the
timeout duration.
Input Voltage Monitor
The LM8502 has an internal comparator that monitors the voltage at VIN and can force the flash LED current into Torch mode or
into shutdown if VIN falls below the programmable Undervoltage Lockout Threshold. Bit 5 in Configuration Register 2 F0H enables
or disables the feature. When enabled, Bits [1] and [2] program the 4 adjustable thresholds of 3.1V, 3.2V, 3.3V and 3.4V. Bit [3] in
Configuration Register 2 F0H selects whether an undervoltage event forces Torch mode or forces the flash LEDs off.
There is a set 100 mV hysteresis for the input voltage monitor. When the input voltage monitor is active, and VIN falls below the
programmed UVLO threshold, the flash LEDs will either turn off or their current will be reduced to the programmed Torch current
setting. To reset the flash LED current to its previous level, two things must occur. First, VIN must go at least 100 mV above the
UVLO threshold; secondly, the Flag register must be read back.
The UVLO flag (bit [6] of the Flag Register) reads back a '1' when the Input Voltage Monitor is enabled and VIN falls below the
programmed UVLO threshold. This flag must be read back in order to resume normal operation after the LED current has been
forced to Torch mode or turned off due to a UVLO event.
Flash LED Fault
The LED Fault flag (bit [2] of the Flag Register) reads back a '1' if the part is active in Flash or Torch mode, and either FLASH1 or
FLASH2 experience an open or short condition. An LED open condition is signaled if the OVP threshold is crossed at OUT while
the device is in either Flash or Torch modes. An LED short condition is signaled if the voltage at FLASH1 or FLASH2 goes below
500 mV while the device is in Torch or Flash modes.
There is a small delay before the flash fault flag is valid. This delay is the time between when the Flash or Torch current is triggered
and the LED voltage and the output voltage is sampled. The flash fault flag can only be reset to '0' by pulling EN pin low or removing
power to the LM8502.
52
Copyright © 1999-2012, Texas Instruments Incorporated
LM8502
LM8502 Timing Diagrams
30078737
Normal Torch to Flash Operation
(Default, Power On or RESET state of LM8502)
30078738
TX1 Event During a Flash Event
(Default State,TX1/TORCH is an Active High TX Input)
30078739
TX1 Event Before and After Flash Event
(Default State, TX1/TORCH is an Active High TX Input
Copyright © 1999-2012, Texas Instruments Incorporated
53
LM8502
30078740
STROBE Input is Level Sensitive
(Default State, STR bit = 0)
30078741
STROBE Input is Edge Sensitive
(STR bit = 1)
30078742
ENVM/TX2 Pin is Configured as an Active High TX Input
54
Copyright © 1999-2012, Texas Instruments Incorporated
LM8502
I2C-Compatible Interface
The I2C-compatible synchronous serial interface provides access to the programmable functions and registers on the device. This
protocol uses a two-wire interface for bidirectional communications between the IC's connected to the bus. The two interface lines
are the Serial Data Line (SDA), and the Serial Clock Line (SCL). Every device on the bus is assigned a unique address and acts
as either a Master or a Slave depending on whether it generates or receives the serial clock SCL. The SCL and SDA lines should
each have a pull-up resistor placed somewhere on the line and remain HIGH even when the bus is idle. Note: CLK pin is not used
for serial bus data transfer. The LM8502 supports high speed I2C.
DATA VALIDITY
The data on SDA line must be stable during the HIGH period of the clock signal (SCL). In other words, state of the data line can
only be changed when clock signal is LOW.
30078766
FIGURE 20. Data Validity Diagram
START AND STOP CONDITIONS
The LM8502 is controlled via an I2C-compatible interface. START and STOP conditions classify the beginning and end of the I2C
session. A START condition is defined as SDA transitions from HIGH to LOW while SCL is HIGH. A STOP condition is defined as
SDA transitioning from LOW to HIGH while SCL is HIGH. The I2C master always generates the START and STOP conditions.
30078718
FIGURE 21. Start and Stop Sequences
The I2C bus is considered busy after a START condition and free after a STOP condition. During data transmission the I2C master
can generate repeated START conditions. A START and a repeated START condition are equivalent function-wise. The data on
SDA must be stable during the HIGH period of the clock signal (SCL). In other words, the state of SDA can only be changed when
SCL is LOW. shows the SDA and SCL signal timing for the I2C-Compatible Bus. See the Electrical Tables for timing values.
30078719
FIGURE 22. I2C-Compatible Timing
Copyright © 1999-2012, Texas Instruments Incorporated
55
LM8502
TRANSFERRING DATA
Every byte put on the SDA line must be eight bits long, with the most significant bit (MSB) being transferred first. Each byte of data
has to be followed by an acknowledge bit. The acknowledge related clock pulse is generated by the master. The master releases
the SDA line (HIGH) during the acknowledge clock pulse. The LM8502 pulls down the SDA line during the 9th clock pulse, signifying
an acknowledge. The M8502 generates an acknowledge after each byte has been received.
There is one exception to the “acknowledge after every byte” rule. When the master is the receiver, it must indicate to the transmitter
an end of data by not-acknowledging (“negative acknowledge”) the last byte clocked out of the slave. This “negative acknowledge”
still includes the acknowledge clock pulse (generated by the master), but the SDA line is not pulled down.
After the START condition, the bus master sends a chip address. This address is seven bits long followed by an eighth bit which
is a data direction bit (READ or WRITE). For the eighth bit, a “0” indicates a WRITE and a “1” indicates a READ. The second byte
selects the register to which the data will be written. The third byte contains data to write to the selected register.
30078767
FIGURE 23. Write Cycle (w = write; SDA = '0'), id = device address = 33H for LM8502
30078768
FIGURE 24. Read Cycle ( r = read; SDA = '1'), id = device address = 33H for LM8502. When READ function is to be
accomplished, a WRITE function must precede the READ function as shown above.
I2C-COMPATIBLE CHIP ADDRESS
The device address for the LM8502 is '0011 0011' (33H). After the START condition, the I2C master sends the 7-bit address followed
by an eighth bit, read or write (R/W). R/W = 0 indicates a WRITE, and R/W = 1 indicates a READ. The second byte following the
device address selects the register address to which the data will be written. The third byte contains the data for the selected
register.
56
Copyright © 1999-2012, Texas Instruments Incorporated
LM8502
30078720
FIGURE 25. Device Address
AUTO INCREMENT FEATURE
The auto increment feature allows writing several consecutive registers within one transmission. Every time an 8-bit word is sent
to the LM8502, the internal address index counter will be incremented by one, and the next register will be written. The table below
shows writing a sequence to two consecutive registers. Note that auto increment feature does not work for read.
TABLE 59. Auto Increment Example
Master
Start
Device Address = 33H
LM8502
Copyright © 1999-2012, Texas Instruments Incorporated
Write
Register Address
ACK
Data
ACK
Data
ACK
Stop
ACK
57
LM8502
Register Descriptions
The LM8502 is controlled with set of registers through the I2C-compatible interface. Table 60 below lists device registers, their
addresses and abbreviations.
TABLE 60. Detailed Register Descriptions
Hex
Address
Register Name
Bit(s) in
Use
[6]
00
ENABLE/ENGINE
CNTRL1
[5:4]
[3:2]
01
58
Read/
Write
R/W
R/W
R/W
Bit Default
Value After
Reset
Bit Mnemonic and Description
0
CHIP_EN
0 = LM8502 not enabled. Device enters Standby
mode. Control registers can be written or read.
1 = LM8502 enabled and internal startup sequence
powers up all needed internal blocks and device
enters Normal mode.
00
ENGINE1_EXEC
Engine 1 program execution control. Execution
register bits define how the program is executed.
Program start address can be programmed to
Program Counter (PC) register 37H.
00 = Hold: Hold causes the execution engine to finish
current instruction and the stop. PC can be read or
written only in this mode.
01 = Step: Execute the instruction at the location
pointed by PC, increment PC by one and then reset
ENG1_EXEC bits to 00.
10 = Free Run: Start program execution from the
instruction pointed by PC.
11 = Execute Once: Execute the instruction pointed by
the current PC value and reset ENG1_EXEC to 00.
The difference between step and execute once is that
execute once does not increment PC.
00
ENGINE2_EXEC
Engine 2 program execution control. Equivalent to
engine 1 control bit. Program start address can be
programmed to PC register 38H.
[5:4]
R/W
00
ENGINE1_MODE
Engine 1 mode control:
00 = Disabled: Engines can be configured to disabled
mode separately.
01 = Load program to SRAM memory, reset PC.
Writing to program memory is allowed only when the
engine is in load program mode and engine busy bit
(3AH) is not set. Serial bus master should check the
busy bit before writing to program memory. Both
engines are in hold while one is in Load mode. Load
mode resets the PC of the respective engine. Load
mode can be entered only from Disabled mode.
Entering Load mode from Run mode is not allowed.
10 = Run mode executes the instructions stored in the
program memory. Engine control register bits define
how the program is executed. Program start address
can be programmed to PC register. PC is reset to zero
when the PC upper limit is reached.
11 = Halt mode halts the engine operation and
instruction execution is aborted immediately.
[3:2]
R/W
00
ENGINE2_MODE
Engine 2 mode control, same as Engine 1.
ENGINE CNTRL2
Copyright © 1999-2012, Texas Instruments Incorporated
LM8502
02 – 04
[7:4]
R/W
0000
[3:0]
R/W
0000
GROUPS 1 – 3
FADING
[7:6]
06 – 0F
00
LED 1 – 10
CONTROL
[5]
[4:3]
[0]
10
R/W
HAPTIC_CONTROL
[7:6]
Copyright © 1999-2012, Texas Instruments Incorporated
R/W
R/W
R/W
R/W
FADE_IN
Fade in time for groups 1 – 3
See fade_in times in (Note 13)
FADE_OUT
Fade out time for groups 1 – 3
See fade_out times in (Note 13)
GROUP_SELECT
Group fader selection for LED outputs 1 – 10:
00 = LED output not grouped to any of the groups.
Default setting.
01 = Fader group 1 controls the LED output. User can
set the overall output of the group from the GROUP 1
FADER register 48H and the fade-in/out times from
the GROUP 1 FADING register 02H.
10 = Fader group 2 controls the LED output. User can
set the overall output of the group from the GROUP 2
FADER register 49H and the fade-in/out times from
the GROUP 2 FADING register 03H.
11 = Fader group 3 controls the LED output. User can
set the overall output of the group from the GROUP 3
FADER register 4AH and the fade-in/out times from
the GROUP 3 FADING register 04H.
0
LOG_EN
Logarithmic dimming control for LED output 1 – 10.
This bit is effective for both the program execution
engine control and direct PWM control.
0 = linear adjustment
1 = logarithmic adjustment
00
FULL_SCALE_SEL
Current full-scale setting for LED outputs 1 – 10:
00 = maximum LED current is 3 mA
01 = maximum LED current is 6 mA
10 = maximum LED current is 12.5 mA
11 = maximum LED current is 25.5 mA
0
LED_BAT_CON
LED outputs 1 – 10 power selection:
0 = LED powered from VOUT
1 = LED powered from external voltage supply
00
GROUP_SELECT
Group fader selection for Haptic feedback outputs:
00 = Haptic output not grouped to any of the groups.
Default setting.
01 = Fader group 1 controls the haptic output. User
can set the overall output of the group from the
GROUP 1 FADER register 48H and the fade-in/out
times from the GROUP 1 FADING register 02H.
10 = Fader group 2 controls the haptic output. User
can set the overall output of the group from the
GROUP 2 FADER register 49H and the fade-in/out
times from the GROUP 2 FADING register 03H.
11 = Fader group 3 controls the haptic output. User
can set the overall output of the group from the
GROUP 3 FADER register 4AH and the fade-in/out
times from the GROUP 3 FADING register 04H.
59
LM8502
[7:5]
11
ALS_CONTROL
[4:3]
[2]
R/W
R/W
000
00
ALS_FUNTIONALITY
ALS functionality selection:
00 = The lowest of ALS1 or ALS2 is the ambient light
sensor input.
01 = ALS1 is the ambient light sensor inpu.t
10 = ALS2 is the ambient light sensor input.
11 = The highest of ALS1 or ALS2 is the ambient light
sensor input.
0
EN_EXT_RES
Enable external resistor use for ALS:
0 = internal resistor in use
1= external resistor in use
ALS_RES_SEL
Internal resistor selection for ALS:
00 = 1.25 kΩ
01 = 2.5 kΩ
10 = 5 kΩ
11 = 10 kΩ
[1:0]
R/W
00
12 – 15
ZLINE 0 – 3
[7:0]
R/W
00000000
INPUT LIGHT ZONE
Input light threshold zones 0 – 3 definition for ALS
16 – 1A
Z0 – Z4 TARGET
LIGHT
[7:0]
R/W
00000000
TARGET LIGHT
Target brightness levels Z0 – Z4 for ALS
1B
60
R/W
AVERAGE_TIME
ALS slope averaging time:
000 = 4 ms
001 = 8 ms
010 = 16 ms
011 = 32 ms
100 = 64 ms
101 = 128 ms
110 = 256 ms
111 = 512 ms
ALS_START_VALUE [2:0]
R/W
000
ALS START VALUE
Starting point for ALS:
000 = Zone 0 target value
001 = Zone 1 target value
010 = Zone 2 target value
011 = Zone 3 target value
100 = Zone 4 target value
101 = ALS remembers last value after power-save
110 = ALS remembers last value after power-save
111 = ALS remembers last value after power-save
Copyright © 1999-2012, Texas Instruments Incorporated
LM8502
[7:6]
[5:3]
1D
R/W
00
000
PWM_SEL_G3–1
Selection of if the PWM input is multiplied group (or
ALS calculation if ALS_EN is set for the group) value.
000 = PWM does not affect any of the Groups
001 = PWM multiplied with G1 value
010 = PWM multiplied with G2 value
011 = PWM multiplied with G1 and G2 values
100 = PWM multplied with G3 value
101 = PWM multiplied with G1 and G3 values
110 = PWM multiplied with G2 and G3 values
111 = PWM multiplied with G1, G2 and G3 values
000
ALS_EN_G3–1
Selection of if the group value is multiplied by ALS:
001 = Group 1 value is multiplied with ALS value
010 = G2 value is multiplied with ALS value
011 = G1 and G2 values are multiplied with ALS value
100 = G3 value is multiplied with ALS value
101 = G1 and G3 values are multiplied with ALS value
110 = G2 and G3 values are multiplied with ALS value
111 = G1, G2 and G3 values are multiplied with ALS
value
00
HAPT_FREQ_SEL
Frequency selection for Haptic feedback:
00 = 157 Hz
01 = 490 Hz
10 = 980 Hz
11 = 3.9 kHz
HAPT_MODE_SEL
Mode selection for Haptic feedback:
000 = Haptic disabled
001 = PWM to both channels (2*pwm_freq)
010 = PWM on A channel, B channel in low state
011 = PWM on B channel, A channel in low state
100 = Haptic disabled
101 = PWM to both channels, no activity at center
value (2*pwm_freq)
110 = PWM on A channel, B channel in high state
111 = PWM on B channel, A channel in high state
DBC CONTROL
[2:0]
[4:3]
21
R/W
PWM_MIN_FREQ
Minimum frequency setting for PWM:
00 = 100 Hz
01 = 500 Hz
10 = 1 kHz
11 = 5 kHz
R/W
R/W
HAPTIC FEEDBACK
CONTROL
[2:0]
R/W
000
22
HAPTIC PWM DUTY
[7:0]
CYCLE
R/W
00000000
PWM_HAPT
Haptic feedback duty cycle setting
26 — 2F
LED1 – 10 CURRENT
[7:0]
CONTROL
R/W
00000000
CURRENT
LED outputs 1– 10 current control (Note 13).
Copyright © 1999-2012, Texas Instruments Incorporated
61
LM8502
[7:4]
35
0000
0000
FLASH_MAX Maximum voltage over flash LED driver
during flash event:
0000 = 300 mV
0001 = 400 mV
0010 = 500 mV
0011 = 600 mV
0100 = 700 mV
0101 = 800 mV
0110 = 900 mV
0111 = 1000 mV
1000 = 1100 mV
1001 = 1200 mV
1010 = 1300 mV
1011 = 1400 mV
1100 = 1500 mV
1101 = 1600 mV
1110 = 1700 mV
1111 = 1800 mV
ADAPT FLASH
CONTROL
[3:0]
62
R/W
FLASH_START Programmable start point for voltageover-flash LED driver during flash event:
0000 = 300 mV
0001 = 400 mV
0010 = 500 mV
0011 = 600 mV
0100 = 700 mV
0101 = 800 mV
0110 = 900 mV
0111 = 1000 mV
1000 = 1100 mV
1001 = 1200 mV
1010 = 1300 mV
1011 = 1400 mV
1100 = 1500 mV
1101 = 1600 mV
1110 = 1700 mV
1111 = 1800 mV
R/W
Copyright © 1999-2012, Texas Instruments Incorporated
LM8502
[7]
[6]
[5]
[3]
36
R/W
R/W
R/W
R/W
0
VAR_INPUT_SEL variable input selection:
0 = Variable D from I2C register
1 = Variable D from ADC
0
MASK_ALS_ZONE_INT
Masks the interrupt:
0 = interrupt comes from ALS zone change
1 = interrupt comes from engines
0
POWERSAVE_EN
Enable for Power-save mode:
0 = Power-save mode disabled
1 = Power-save mode enabled
0
EN_BOOST
Boost enable:
0 = Boost disabled
1= Boost enabled
0
FADE_TO_OFF
Enable group fading when device disabled:
0 = Fade_to_off disabled
1 = Fade_to_off enabled
0
PWM_INPUT_SEL
PWM input selection which is used in dynamic
backlight calculation:
0 = Haptic generator PWM output connected to PWM
calculation unit
1 = External PWM input connected to PWM
calculation unit
INT_CLK_EN
Clock source selection:
1 = internal clock in use
0 = external clock in use
MISC
[2]
[1]
R/W
R/W
[0]
R/W
0
37
CHANNEL 1 PC
[5:0]
R/W
000000
Engine 1 Program Counter
38
CHANNEL 2 PC
[5:0]
R/W
000000
Engine 2 Program Counter
[7]
R
0
LED_MEAS_DONE
Bit = 1 indicates when LED TEST measurement is
done.
[6]
R
0
MASK_BUSY
Mask bit for interrupt generated by ENGINE_BUSY
[5]
R
0
ALS_ZONE_CHANGE
Indicates zone change in ALS.
[4]
R
0
ENGINE_BUSY
Indicates that a lighting engine is clearing internal
registers.
[2]
R
0
CH1_INT
Interrupt for lighting engine 1.
[1]
R
0
CH2_INT
Interrupt for lighting engine 2.
INT CONFIG
[1]
R/W
0
INT_CONFIG
0 = INT enabled
1 = INT disabled, INT to general purpose ADC
PWM CONFIG
[0]
R/W
0
PWM_CONFIG
0 = PWM enabled, ENVM/TX2 disabled
1 = PWM disabled, ENVM/TX2 enabled
3C
I2C VARIABLE
[7:0]
R/W
00000000
I2C variable value
3D
RESET
[7:0]
W
00000000
Writing 11111111 into this register resets the LM8502.
3A
STATUS/
INTERRUPT
3B
Copyright © 1999-2012, Texas Instruments Incorporated
63
LM8502
[7]
[6]
[5]
41
64
R/W
R/W
R/W
0
EN_ADC
Enables general purpose ADC:
0 = general purpose ADC disabled
1 = general purpose ADC enabled
0
EN_ADC_INT
Enables interrupt from general purpose ADC:
0 = No interrupt from ADC
1 = Interrupt generated from ADC of conversion
0
CONTINUOUS_CONV
Enables continuous conversion of the ADC:
0 = Continuous conversion disabled
1= Continuous conversion enabled
ADC CONTROL
[4:0]
R/W
00000
ADC_CTRL
Selects which signal is measured with general
purpose ADC:
00000 = LED output 1
00001 = LED output 2
00010 = LED output 3
00011 = LED output 4
00100 = LED output 5
00101 = LED output 6
00110 = LED output 7
00111 = LED output 8
01000 = LED output 9
01001 = LED output 10
01010 = Flash/Vibra output 1
01011 = Flash/Vibra output 2
01100 = Indicatior LED output
01111 = VOUT
10000 = ALS1 input
10001 = INT pin
rest not used
42
LED_TEST_ADC
[7:0]
R
00000000
Result of the LED TEST ADC.
48 – 4A
GROUP1–3 FADER
VALUE
[7:0]
R/W
00000000
Groups 1–3 fader control
4C
CH1 PROG START
ADDR
[5:0]
R/W
000000
Lighting engine 1 program start address.
4D
CH2 PROG START
ADDR
[5:0]
R/W
000000
Lighting engine 2 program start address.
4F
PROG MEM PAGE
SEL
[1:0]
R/W
00
50 – 6F
PROGRAM
MEMORY
[7:0]
R/W
00000000
SRAM memory page selection
Program memory for instructions. Every instruction is
16 bits long.
Copyright © 1999-2012, Texas Instruments Incorporated
LM8502
TORCH
BRIGHTNESS
[7:6]
R/W
01
IND_CURRENT
Indicator LED current:
00 = 2.3 mA
01 = 4.6 mA
10 = 7.9 mA
11 = 9.2 mA
[5:3]
R/W
010
TORCH_CURRENT
Torch current setting per output:
000 = 18.75 mA
001 = 37.5 mA
010 = 56.25 mA
011 = 75 mA
100 = 93.75 mA
101 = 112.5 mA
110 = 131.25 mA
111 = 150 mA
[2]
R/W
0
VM
Voltage mode enable:
0 = Voltage mode disabled
1= Voltage mode enabled
[1:0]
R/W
00
EN1–0
Flash/torch enable:
00 = Flash shutdown
01 = Indicator mode
10 = Torch mode
11 = Fash mode
A0
Copyright © 1999-2012, Texas Instruments Incorporated
65
LM8502
FLASH
BRIGHTNESS
[7]
R/W
0
STR
Determines how flash pulse ends:
0 = Flash pulse can be terminated by pulling STROBE
low, programming bit [1:0] of register A0H or B0H to
'00' (flash shutdown) or by allowing Flash TImeout
period to elapse.
1 = Flash pulse will only terminate by reaching the end
of Flash Timeout period.
[6:3]
R/W
1101
FLASH_CURRENT per output:
0000 = 37.5 mA
0001 = 75 mA
0010 = 112.5 mA
0011 = 150 mA
0100 = 187.5 mA
0101 = 225 mA
0110 = 262.5 mA
0111 = 300mA
1000 = 337.5 mA
1001 = 375 mA
1010 = 412.5 mA
1011 = 450 mA
1100 = 487.5 mA
1101 = 525 mA
1110 = 562.5 mA
1111 = 600 mA
[2]
R/W
0
VM Voltage mode enable:
0 = Voltage mode disabled
1= Voltage mode enabled
[1:0]
R/W
00
EN1–0
Flash/Torch enable:
00 = Flash shutdown
01 = Indicator mode
10 = Torch mode
11 = Flash mode
B0
66
Copyright © 1999-2012, Texas Instruments Incorporated
LM8502
FLASH DURATION
[6:5]
R/W
10
CURRENT_LIMIT
Selects Flash peak current limit:
00 = 1A
01 = 1.5A
10 = 2A
11 = 2.5A
[4:0]
R/W
01111
FLASH_TIMEOUT
Sets Flash timeout time:
00000 = 32 ms
00001 = 64 ms
00010 = 96 ms
00011 = 128 ms
00100 = 160 ms
00101 = 192 ms
00110 = 224 ms
00111 = 256 ms
01000 = 288 ms
01001 = 320 ms
01010 = 352 ms
01011 = 384 ms
01100 = 416 ms
01101 = 448 ms
01110 = 480 ms
01111 = 512 ms
10000 = 544 ms
10001 = 576 ms
10010 = 608 ms
10011 = 640 ms
10100 = 672 ms
10101 = 704 ms
10110 = 736 ms
10111 = 768 ms
11000 = 800 ms
11001 = 832 ms
11010 = 864 ms
11011 = 896 ms
11100 = 928 ms
11101 = 960 ms
11110 = 992 ms
11111 = 1024 ms
C0
Copyright © 1999-2012, Texas Instruments Incorporated
67
LM8502
FLAG REGISTER
[7]
R
0
UVLO_FLAG
Indicates the status of VIN pin:
0 = VIN above UVLO threshold
1 = Voltage Monitor enabled and VIN falls below
programmed UVLO threshold
[5]
R
0
NTC FLAG
Indicates the status of NTC pin:
0 = LEDI/NTC voltage above trip point voltage V.TRIP
(1V)
1 = device is active in Flash or Torch modes, it is in
NTC mode, and the voltage at LEDI/NTC has fallen
below trip point voltage VTRIP (1V).
[4]
R
0
TX2 FLAG
Indicates the status of TX2 pin:
0 = no TX event
1 = TX event since the last read of register D0H
[3]
R
0
TX1 FLAG
Indicates the status of TX1 pin:
0 = no TX event since the last read of register D0H
1= TX change from low to high since last read of
register D0H
[2]
R
0
FLASH LED FAULT
Indicates Flash short or open fault:
0 = no open nor short in FLASH1 or FLASH2
1 = device active in Flash or Torch mode and either
FLASH1 or FLASH2 experience an open or short
condition
[1]
R
0
TSD FLAG
Indicates if Thermal Shutdown limit has been crossed:
0 = TSD limit has not been crossed
1 = TSD limit has been crossed
[0]
R
0
FLASH_TIMEOUT FLAG
Indicates if Flash timeout has expired:
0 = Flash pulse terminated before Time out
1 = Time Out expired before Flash pulse is terminated
D0
68
Copyright © 1999-2012, Texas Instruments Incorporated
LM8502
CONFIG REG 1
[7]
R/W
0
TX1/TORCH
Configuration of TX1/TORCH pin:
0 = TX1/TORCH is a power amplifier synchronization
input
1 = TX1/TORCH is a hardware Torch mode enable
[6]
R/W
1
TX2 POLARITY
Selects if TX2 is an active high or active low Flash
inhibit:
0 = TX2 is an active low transmit interrupt input
1 = TX2 is an active high transmit interrupt input
[5]
R/W
0
TX2 PIN CONFIG
Configuration of TX2 pin (when PWM mode not
selected for this PWM/ENVM/TX2 pin):
0 = ENVM/TX2 pin is an active high logic input that
forces the device into Constant Voltage Output mode
1 = ENVM/TX2 pin is a power amplifier
synchronization input that forces the device from
Flash mode into Torch mode
[4]
R/W
0
NTC HYST
Hysteresis selection for NTC comparator:
0 = 125 mV hysteresis
1 = 250 mV hysteresis
[3]
R/W
0
LEDI_NTC
Configuration of LEDI/NTC pin:
0 = LEDI/NTC pin configured as LED indicator driver
1 = Indicator current source disabled and LEDI/NTC
pin configured as detector for NTC thermistor
[2]
R/W
0
DIS_EXT_STROBE
Disables/Enables STROBE input:
0 = External STROBE enabled
1 = External STROBE disabled
[1]
R/W
1
VM VALUE
Output Voltage Selection:
0 = Output voltage 4.5 V
1 = Output voltage 5 V
[0]
R/W
0
DIS PFM
Disables/Enables light load comparator:
0 = light load comparator enabled
1 = light load comparator disabled
E0
Copyright © 1999-2012, Texas Instruments Incorporated
69
LM8502
CONFIG REG 2
[7:6]
R/W
00
UVLO_LEVEL
Selects VIN monitor threshold voltage level:
00 = 3.1V
01 = 3.2V
10 = 3.3V
11 = 3.4V
[5]
R/W
0
EN_UVLO
Disables/Enables VIN monitor:
0 = UVLO feature enabled
1 = UVLO feature disabled
[4]
R/W
0
EN_NTC_INTERRUPT
Disables/Enables possibility to send interruption in
NTC event:
0 = interrupt disabled
1 = interrupt enabled
[3]
R/W
0
UVLO_MODE
Selects Flash LED behavior in UVLO (VIN monitoring)
event:
0 = If VIN drops below UVLO threshold Flash LEDs
turn off
1 = If VIN drops below UVLO threshold Flash LEDs
are forced into Torch mode
[2]
R/W
0
AET MODE
Enables Alternative external operation:
0 = TX1/TORCH is a transmit interrupt that forces
Torch mode only during Flash event
1 = TX1/TORCH becomes dependent of STROBE
[1]
R/W
0
NTC_MODE
Selects Flash LED behavior in case of NTC event:
0 = device will be forced into Torch mode when voltage
at LEDI/NTC falls below VTRIP (1V)
1 = device will shut down flash LED current sources
when voltage at LEDI/NTC falls below VTRIP (1V)
[0]
R/W
0
TX2_SHUTDOWN
Selects Flash LED behavior in case of TX2 event:
0 = device will be forced into Torch mode in case of
TX2 event
1 = device will shut down flash LED current sources in
case of TX2 event
[2:0]
R
0
ALS_ZONE_DATA
Indicates ALS zone:
000 = Zone 0
001= Zone 1
010 = Zone 2
011 = Zone 3
100 = Zone 4
F0
ALS_ZONE_DATA
97
Note 13: Register I2C write has an effect when device is in Normal mode.
70
Copyright © 1999-2012, Texas Instruments Incorporated
LM8502
Layout Recommendations
The high frequency and large switching currents of the LM8502 make the choice of layout important. The following steps should
be used as a reference to ensure the device is stable and maintains proper voltage and current regulation across its intended
operating voltage and current range.
1. Place CIN as close as possible to the VIN terminal and the GND terminal.
2. Place COUT as close as possible to the OUT terminal and the GND terminal. The returns for both CIN and COUT should come
together at one point, and as close to the GND pin as possible. This will reduce the series inductance and limit noise at the GND
pin that will inject noise into the device.
Copyright © 1999-2012, Texas Instruments Incorporated
71
LM8502
Physical Dimensions inches (millimeters) unless otherwise noted
The dimension for X1, X2 and X3 are as given:
— X1 = 2.42 mm ± 0.03 mm
— X2 = 2.77 mm ± 0.03 mm
— X3 = 0.60 mm ± 0.03 mm
NS Package Number TMD30SQA
30-bump micro SMD
Order Number LM8502TME/LM8502TMX
72
Copyright © 1999-2012, Texas Instruments Incorporated
LM8502
Notes
Copyright © 1999-2012, Texas Instruments Incorporated
73
Notes
Copyright © 1999-2012, Texas Instruments
Incorporated
IMPORTANT NOTICE
Texas Instruments Incorporated and its subsidiaries (TI) reserve the right to make corrections, enhancements, improvements and other
changes to its semiconductor products and services per JESD46C and to discontinue any product or service per JESD48B. Buyers should
obtain the latest relevant information before placing orders and should verify that such information is current and complete. All
semiconductor products (also referred to herein as “components”) are sold subject to TI’s terms and conditions of sale supplied at the time
of order acknowledgment.
TI warrants performance of its components to the specifications applicable at the time of sale, in accordance with the warranty in TI’s terms
and conditions of sale of semiconductor products. Testing and other quality control techniques are used to the extent TI deems necessary
to support this warranty. Except where mandated by applicable law, testing of all parameters of each component is not necessarily
performed.
TI assumes no liability for applications assistance or the design of Buyers’ products. Buyers are responsible for their products and
applications using TI components. To minimize the risks associated with Buyers’ products and applications, Buyers should provide
adequate design and operating safeguards.
TI does not warrant or represent that any license, either express or implied, is granted under any patent right, copyright, mask work right, or
other intellectual property right relating to any combination, machine, or process in which TI components or services are used. Information
published by TI regarding third-party products or services does not constitute a license to use such products or services or a warranty or
endorsement thereof. Use of such information may require a license from a third party under the patents or other intellectual property of the
third party, or a license from TI under the patents or other intellectual property of TI.
Reproduction of significant portions of TI information in TI data books or data sheets is permissible only if reproduction is without alteration
and is accompanied by all associated warranties, conditions, limitations, and notices. TI is not responsible or liable for such altered
documentation. Information of third parties may be subject to additional restrictions.
Resale of TI components or services with statements different from or beyond the parameters stated by TI for that component or service
voids all express and any implied warranties for the associated TI component or service and is an unfair and deceptive business practice.
TI is not responsible or liable for any such statements.
Buyer acknowledges and agrees that it is solely responsible for compliance with all legal, regulatory and safety-related requirements
concerning its products, and any use of TI components in its applications, notwithstanding any applications-related information or support
that may be provided by TI. Buyer represents and agrees that it has all the necessary expertise to create and implement safeguards which
anticipate dangerous consequences of failures, monitor failures and their consequences, lessen the likelihood of failures that might cause
harm and take appropriate remedial actions. Buyer will fully indemnify TI and its representatives against any damages arising out of the use
of any TI components in safety-critical applications.
In some cases, TI components may be promoted specifically to facilitate safety-related applications. With such components, TI’s goal is to
help enable customers to design and create their own end-product solutions that meet applicable functional safety standards and
requirements. Nonetheless, such components are subject to these terms.
No TI components are authorized for use in FDA Class III (or similar life-critical medical equipment) unless authorized officers of the parties
have executed a special agreement specifically governing such use.
Only those TI components which TI has specifically designated as military grade or “enhanced plastic” are designed and intended for use in
military/aerospace applications or environments. Buyer acknowledges and agrees that any military or aerospace use of TI components
which have not been so designated is solely at the Buyer's risk, and that Buyer is solely responsible for compliance with all legal and
regulatory requirements in connection with such use.
TI has specifically designated certain components which meet ISO/TS16949 requirements, mainly for automotive use. Components which
have not been so designated are neither designed nor intended for automotive use; and TI will not be responsible for any failure of such
components to meet such requirements.
Products
Applications
Audio
www.ti.com/audio
Automotive and Transportation www.ti.com/automotive
Amplifiers
amplifier.ti.com
Communications and Telecom www.ti.com/communications
Data Converters
dataconverter.ti.com
Computers and Peripherals
www.ti.com/computers
DLP® Products
www.dlp.com
Consumer Electronics
www.ti.com/consumer-apps
DSP
dsp.ti.com
Energy and Lighting
www.ti.com/energy
Clocks and Timers
www.ti.com/clocks
Industrial
www.ti.com/industrial
Interface
interface.ti.com
Medical
www.ti.com/medical
Logic
logic.ti.com
Security
www.ti.com/security
Power Mgmt
power.ti.com
Space, Avionics and Defense
www.ti.com/space-avionics-defense
Microcontrollers
microcontroller.ti.com
Video and Imaging
www.ti.com/video
RFID
www.ti-rfid.com
OMAP Mobile Processors
www.ti.com/omap
TI E2E Community
e2e.ti.com
Wireless Connectivity
www.ti.com/wirelessconnectivity
Mailing Address: Texas Instruments, Post Office Box 655303, Dallas, Texas 75265
Copyright © 2012, Texas Instruments Incorporated