0
登录后你可以
  • 下载海量资料
  • 学习在线课程
  • 观看技术视频
  • 写文章/发帖/加入社区
创作中心
发布
  • 发文章

  • 发资料

  • 发帖

  • 提问

  • 发视频

创作活动
LM8502TMX/NOPB

LM8502TMX/NOPB

  • 厂商:

    BURR-BROWN(德州仪器)

  • 封装:

    WFBGA30

  • 描述:

    LM8502 INTELLIGENT LIGHTING MANA

  • 数据手册
  • 价格&库存
LM8502TMX/NOPB 数据手册
LM8502 www.ti.com SNVS592D – OCTOBER 2009 – REVISED FEBRUARY 2013 LM8502 Intelligent Lighting Management Unit That Fuses a 1.2A Dual High-Side Flash LED Driver with a 10-Output Low-Side LED Driver Check for Samples: LM8502 FEATURES DESCRIPTION • The LM8502 is a versatile LED driver suitable for multiple applications. It includes a 2MHz, fixedfrequency synchronous boost converter, 10 current sink LED outputs, 2 outputs for flash or haptic applications, ambient light sensing and PWM input. 1 2 • • • • • • • • • • • • • 10 Programmable Low-Side Current Sinks with Flexible 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 DSBGA Package APPLICATIONS • • • • 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 enginedriven 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 Power-save mode and use of an external clock reduce current consumption significantly. Camera Phone LED Flash General Illumination in Portable Devices Haptic Feedback Motor Driver Fun Lighting 1 2 Please be aware that an important notice concerning availability, standard warranty, and use in critical applications of Texas Instruments semiconductor products and disclaimers thereto appears at the end of this data sheet. All trademarks are the property of their respective owners. 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. Copyright © 2009–2013, Texas Instruments Incorporated LM8502 SNVS592D – OCTOBER 2009 – REVISED FEBRUARY 2013 www.ti.com TYPICAL APPLICATION CIRCUITS 2.2 PH 10 PF VIN = 2.7V TO 5.5V OUT SW D1 VDD D2 10 PF D3 TX1/TORCH STROBE D4 PWM/ENVM/TX2 D5 ALS1 D6 D7 Interrupt LM8502 INT External clock input for power saving CLK Trigger pin for lighting engine TRIG D8 D9 D10/ALS2 VBIAS FLASH1 SCL FLASH2 Flash 1.2A SDA LEDI/NTC EN GND Figure 1. 5,77 CIN VIN TX1/TORCH GND PWM/ENVM/TX2 EN COUT GND OUT FLASH1 FLASH2 A5 B5 C5 D5 E5 F5 SDA CLK A4 B4 C4 D4 E4 F4 SCL INT A3 B3 C3 D3 E3 F3 TRIG ALS1 A2 B2 C2 D2 E2 F2 A1 B1 C1 D1 E1 F1 D7 D9 D5 D3 D1 LEDI/ D10/ D8 D6 D4 NTC ALS 5.42 mm SW D2 Figure 2. 2 Submit Documentation Feedback Copyright © 2009–2013, Texas Instruments Incorporated Product Folder Links: LM8502 LM8502 www.ti.com SNVS592D – OCTOBER 2009 – REVISED FEBRUARY 2013 CONNECTION DIAGRAM DSBGA Package See package number YFQ0030SQA 5 5 4 4 3 3 2 2 1 F E D C B 1 A A Figure 3. Bottom View B C D E F Figure 4. Top View Pin Descriptions Name Pin No. FLASH2/VIBRAN A1 High Side Current Source Output for Flash LED or Output for Haptic Feedback FLASH1/VIBRAP A2 High Side Current Source Output for Flash LED or Output for Haptic Feedback OUT A3, B3 Step-Up DC/DC Converter Output SW A4, B4 Drain Connection for Internal NMOS and Synchronous PMOS Switches GND A5, B5 Ground D9 B1 LED Output 9 D10/ALS2 B2 LED Output 10 or Secondary Ambient Light Sensor Input D7 C1 LED Output 7 D8 C2 LED Output 8 C3 Configurable as a High Side Current Source Output for Indicator LED or Threshold Detector for LED Temperature Sensing (Leave unconnected if not used) LEDI/NTC Description STROBE C4 Active High Hardware Flash Enable. Drive STROBE high to turn on Flash pulse (Connect to GND if not used) VIN C5 Input Voltage Connection D5 D1 LED Output 5 D6 D2 LED Output 6 ALS1 D3 Primary Ambient Light Sensor Input (Leave unconnected if not used) PWM/ENVM/TX2 D4 Configurable as PWM Input, an Active High Voltage mode Enable or Dual Polarity Power Amplifier Synchronization Input (connect to GND if not used). TX1/TORCH D5 Configurable as an RF Power Amplifier Synchronization Control Input or Hardware Torch Enable (connect to GND if not used). D3 E1 LED Output 3 D4 E2 LED Output 4 INT E3 Interrupt for MCU (Leave unconnected if not used) CLK E4 External 32 kHz Clock Input (Connect to GND if not used) EN E5 Enable/Reset D1 F1 LED Output 1 D2 F2 LED Output 2 TRIG F3 Trigger Input/Output for Lighting Engines (Connect to GND if not used) SCL F4 Serial Clock Input SDA F5 Serial Data Input/Output Submit Documentation Feedback Copyright © 2009–2013, Texas Instruments Incorporated Product Folder Links: LM8502 3 LM8502 SNVS592D – OCTOBER 2009 – REVISED FEBRUARY 2013 www.ti.com BLOCK DIAGRAM 2.2 PH COUT 10 PF SW OUT VDD CIN 10 PF LEDI BOOST ANALOG SUPPORT BLOCKS (VREF, OSC, TSD, BIAS) NOTE! Flash outputs are optional with haptic outputs Vibra motor OUT_P LEDI/NTC OUT_N + 1V FLASH/HAPTIC DRIVERS FLASH1 FLASH2 PWM GENERATOR TX1/TORCH IDAC AND LOW SIDE LED DRIVERS STROBE CTRL REG GND D1 D2 SCL SERIAL DATA D3 CONTROL SDA D4 POR PWM/ ENVM/TX2 D5 D/A D6 EN D7 CLK D8 D9 ALS1 D10 ALS ALS2 INPUT INT LIGHTING ENGINE TRIG PROGRAM MEMORY LIGHTING ENGINE GND These devices have limited built-in ESD protection. The leads should be shorted together or the device placed in conductive foam during storage or handling to prevent electrostatic damage to the MOS gates. 4 Submit Documentation Feedback Copyright © 2009–2013, Texas Instruments Incorporated Product Folder Links: LM8502 LM8502 www.ti.com SNVS592D – OCTOBER 2009 – REVISED FEBRUARY 2013 Absolute Maximum Ratings (1) (2) (3) VIN, VSW, VOUT,VFLASH LEDS 1,2, VLED OUTPUTS, VLEDI/NTC (4) −0.3V to 6V −0.3V to VIN+0.3V with 6.0V max Voltage on Logic Pins (Input or Output Pins) Continuous Power Dissipation (5) Internally Limited Junction Temperature (TJ-MAX) +150°C −65°C to +150° C Storage Temperature Range Maximum Lead Temperature (Soldering) (6) (1) (2) (3) (4) (5) (6) 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. All voltages are with respect to the potential at the GND pin. If Military/Aerospace specified devices are required, please contact the Texas Instruments Sales Office / Distributors for availability and specifications. Voltage spikes on SW pin can be higher than 6V. 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). For detailed soldering specifications and information, please refer to Texas Instruments Application Note 1112: Micro SMD Wafer Level Chip Scale Package (AN-1112). Operating Ratings VIN 2.7V to 5.5V Junction Temperature (TJ) (1) −30°C to +125°C −30°C to +85°C Ambient Temperature (TA) (1) 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.). Thermal Properties Junction-to-Ambient Thermal Resistance (θJA) (1) (1) 60°C/W 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. Submit Documentation Feedback Copyright © 2009–2013, Texas Instruments Incorporated Product Folder Links: LM8502 5 LM8502 SNVS592D – OCTOBER 2009 – REVISED FEBRUARY 2013 www.ti.com Electrical Characteristics (1) 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. Parameter ISTANDBY Current Consumption in Standby mode Test 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 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 % mA VHR Current Source Regulation Voltage (VOUT − VFLASH) 600 mA setting, VOUT = 3.75V 250 mV IMATCH Flash LED Current Matching 600 mA setting, VFLASH = 3V 0.5 % tTX Flash-to-Torch Flash LED Current Settling Time (2) 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 ON-Resistance 800 RNMOS NMOS Switch ON-Resistance 800 PWM frequency PWM on both channels (register 21H setting '11' for bits [4:3]) 7.8 mΩ kHz STEP-UP DC/DC CONVERTER SPECIFICATIONS IOUT = 0mA, Constant Voltage mode, 5V setting 4.8 5 5.2 VOVP Output Over Voltage Protection Trip Point On Threshold, 2.7V ≤ VIN ≤ 5.5V 5.5 5.6 5.7 Off Threshold 5.2 5.4 5.5 RPMOS PMOS Switch On-Resistance IPMOS = 250 mA 170 RNMOS NMOS Switch On-Resistance INMOS = 1A 130 ICL Switch Current Limit CL bits = 10 IOUT_SC Output Short Circuit Current Limit VOUT < 2.3V fSW Switching Frequency 2.7V ≤ VIN ≤ 5.5V IPASSMODE Passmode Supply Current Device Not Switching, chip_en bit = '1', boost_en bit = '1' VOUT_ACCU Output Voltage Accuracy 1.7 2 mΩ 2.3 550 1.9 2 350 V A mA 2.1 MHz µA LEDI SPECIFICATIONS ILEDI/NTC (1) (2) 6 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 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. Guaranteed by design. VEN = 1.65V to VIN. Submit Documentation Feedback Copyright © 2009–2013, Texas Instruments Incorporated Product Folder Links: LM8502 LM8502 www.ti.com SNVS592D – OCTOBER 2009 – REVISED FEBRUARY 2013 Electrical Characteristics(1) (continued) 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. Parameter Test Conditions Min Typ Max Units 1 µA 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 (3) (3) IMATCH Matching VSAT Saturation Voltage Output Current Set to 17.5 mA −5 mA +5 Output Current Set to 17.5 mA 1 Output Current Set to 17.5 mA 45 65 % mV GENERAL PURPOSE ADC ELECTRICAL CHARACTERISTICS (4) LSB Least Significant Bit EABS Total Unadjusted Error tCONV Conversion Time VIN_TEST (5) VIN_TEST = 0V to VIN (4) DC Voltage Range (4) 30 mV ±3 LSB 2.7 ms 0 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 0.5 II Input Current −1.0 V 1.0 µA 0.2xVEN V 1.0 µA 1.0 µA LOGIC INPUT SCL, SDA, CLK, STROBE, TX1/TORCH, PWM/ENVM/TX2, TRIG VIL Input Logic Low VIH Input Logic High II Input Current 0.8xVEN V −1.0 LOGIC OUTPUT SDA, TRIG, INT VOL Output Low Level IL Output Leakage Current IOUT = 3 mA 0.3 RECOMMENDED EXTERNAL CLOCK SOURCE (CLK) CONDITIONS V (4) (6) fCLK Clock Frequency tCLKH High TIme tCLKL Low Time tr Clock Rise TIme 10% to 90% 2 tf Clock Fall Time 90% to 10% 2 (3) (4) (5) (6) 32.7 kHz 6 6 µs 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. Guaranteed by design. VEN = 1.65V to VIN. Total unadjusted error includes offset, full-scale and linearity errors. 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. Submit Documentation Feedback Copyright © 2009–2013, Texas Instruments Incorporated Product Folder Links: LM8502 7 LM8502 SNVS592D – OCTOBER 2009 – REVISED FEBRUARY 2013 www.ti.com Electrical Characteristics(1) (continued) 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. Parameter Test Conditions FAST MODE I2C-COMPATIBLE TIMING SPECIFICATIONS (SCL, SDA) Min Typ Max Units 400 kHz (7) fSCL SCL Clock Frequency 1 Hold Time (repeated) START Condition Fast mode 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 HIGH-SPEED MODE I2C-COMPATIBLE TIMING SPECIFICATIONS (SCL, SDA) µs µs 200 ns 3.4 MHz (7) 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 (7) ns 70 ns Guaranteed by design. VEN = 1.65V to VIN. 10 SDA 6 7 8 1 7 2 SCL 1 5 3 4 9 Figure 5. I2C Timing 8 Submit Documentation Feedback Copyright © 2009–2013, Texas Instruments Incorporated Product Folder Links: LM8502 LM8502 www.ti.com SNVS592D – OCTOBER 2009 – REVISED FEBRUARY 2013 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 vs Load Current (Voltage Output Mode, 5V) Boost Efficiency with Constant Current Load (Voltage Output Mode, 5V) 99.0 95.0 IOUT = 100 mA 88.8 EFFICIENCY (%) EFFICIENCY (%) 90.4 81.8 IOUT = 200 mA 73.2 IOUT = 500 mA 64.6 82.6 VIN = 4.2V 76.4 VIN = 3.6V 70.2 VIN = 3.0V IOUT = 1A 56.0 2.5 3.0 3.5 4.0 4.5 64.0 0.1 5.0 0.3 INPUT VOLTAGE (V) 0.5 0.7 0.9 LOAD CURRENT (A) Figure 6. Figure 7. LED Efficiency (OSRAM LWQ38) Flash LED Efficiency vs VIN (Single Flash LED) 88.0 87.2 FLASH LED EFFICIENCY (%) LED EFFICIENCY (%) 81.4 74.8 6 LEDs on 68.2 10 LEDs on 61.6 81.0 74.8 750 mA 68.6 600 mA 62.4 56.2 450 mA 300 mA 1 LED on 55.0 2.7 3.2 3.6 4.1 4.5 50.0 2.5 5.0 3.0 INPUT VOLTAGE (V) Figure 8. 1.9 VIN 4.0 4.5 5.0 Figure 9. Input Current vs (Single Flash LED) 83.0 750 mA Flash LED Efficiency vs VIN (Dual Flash LED) 77.4 1.6 600 mA EFFICIENCY (%) INPUT CURRENT (A) 3.5 INPUT VOLTAGE (V) 450 mA 1.3 300 mA 0.9 66.2 525 mA 600 mA 450 mA 60.6 0.6 0.3 2.5 71.8 300 mA 3.0 3.5 4.0 4.5 5.0 55.0 2.5 3.0 3.5 4.0 4.5 5.0 INPUT VOLTAGE (V) INPUT VOLTAGE (V) Figure 10. Figure 11. Submit Documentation Feedback Copyright © 2009–2013, Texas Instruments Incorporated Product Folder Links: LM8502 9 LM8502 SNVS592D – OCTOBER 2009 – REVISED FEBRUARY 2013 www.ti.com TYPICAL PERFORMANCE CHARACTERISTICS (continued) 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. 2.3 Flash LED Current vs VIN (Dual Flash LED) Flash LED current vs VIN 0.7 600 mA 600 mA 2.0 450 mA 1.6 FLASH LED CURRENT (A) INPUT CURRENT (A) 525 mA 0.6 525 mA 300 mA 1.3 0.9 450 mA 0.4 300 mA 0.3 150 mA 0.1 75 mA 0.6 2.5 • • • • • 3.0 3.5 4.0 4.5 0.0 2.5 5.0 3.5 4.0 4.5 5.0 INPUT VOLTAGE (V) Figure 12. Figure 13. 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 Channel1: VOUT (2V/div) Channel4: ILED (500mA/div) Channel2: IL (500 mA/div) Channel3: STROBE (5V/div) Time Base: 100 µs/div • • • • • Channel1: VOUT (2V/div) Channel4: IL (100 mA/div) Channel2: IL (500 mA/div) Channel3: TX1 (5V/div) Time Base: 100 µs/div Figure 14. 10 3.0 INPUT VOLTAGE (V) Figure 15. Submit Documentation Feedback Copyright © 2009–2013, Texas Instruments Incorporated Product Folder Links: LM8502 LM8502 www.ti.com SNVS592D – OCTOBER 2009 – REVISED FEBRUARY 2013 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. Submit Documentation Feedback Copyright © 2009–2013, Texas Instruments Incorporated Product Folder Links: LM8502 11 LM8502 SNVS592D – OCTOBER 2009 – REVISED FEBRUARY 2013 www.ti.com MODES OF OPERATION RESET: 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 (POR=1) POR=0 STANDBY EN = 1 AND CHIP_EN = 1 Register Reset or POR=1 INTERNAL STARTUP SEQUENCE EN = 0 OR CHIP_EN = 0 TSHD = 1 EN_BOOST = 1 EN_BOOST = 0 BOOST STARTUP EN_BOOST = 1 Boost Voltage > 2.2V NORMAL MODE Device not idle POWERSAVE_EN = 1 and Device is idle POWERSAVE MODE Figure 16. Startup Sequence 12 Submit Documentation Feedback Copyright © 2009–2013, Texas Instruments Incorporated Product Folder Links: LM8502 LM8502 www.ti.com SNVS592D – OCTOBER 2009 – REVISED FEBRUARY 2013 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 1. 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 2. 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 2 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 17. 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.) 26.0 26 25.5 mA 25.5 mA 20.8 20.8 CURRENT (mA) CURRENT (mA) 12.5 mA 6 mA 15.6 3 mA 10.4 12.5 mA 15.6 3 mA 10.4 6 mA 5.2 5.2 0 0 52 104 156 208 260 0 0 CURRENT REGISTER CODE (dec) 52 104 156 208 CURRENT REGISTER CODE (dec) Figure 17. LED Dimming In Linear and Logarithmic Modes Submit Documentation Feedback Copyright © 2009–2013, Texas Instruments Incorporated Product Folder Links: LM8502 13 LM8502 SNVS592D – OCTOBER 2009 – REVISED FEBRUARY 2013 www.ti.com 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 I2Ccompatible 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. Fade-in 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 3. Fade in/out times 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 – 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: 14 Submit Documentation Feedback Copyright © 2009–2013, Texas Instruments Incorporated Product Folder Links: LM8502 LM8502 www.ti.com SNVS592D – OCTOBER 2009 – REVISED FEBRUARY 2013 Table 4. LM8502 LED Driver Instructions Bit [15] Bit [14] Bit [13] Bit [12] Ramp 0 prescale Fast Ramp 1 1 0 0 Set Brightness (Absolute value) 0 1 0 Set Brightness (Relative value) 0 0 0 Wait 0 prescale Inst. Bit [11] Bit [10] Bit [9] Bit [8] 0 1 0 Sign 0 0 0 0 0 Brightness value 0 0 0 0 Sign Brightness value step time Bit [7] Bit [6] Bit [5] Bit [4] Sign Time Bit [3] Bit [2] Bit [1] Bit [0] # of increments Step size 0 0 # of increments 0 0 0 0 0 0 0 Bit [3] Bit [2] Bit [1] Bit [0] Table 5. LM8502 LED Driver Instructions with Variables Bit [15] Bit [14] Bit [13] Bit [12] Bit [11] Bit [10] Bit [9] Bit [8] Bit [7] Bit [6] Bit [5] Bit [4] Variable Ramp 1 0 0 0 0 1 0 0 0 0 prescale sign Variable Set Brightness 1 0 0 0 0 1 0 0 0 1 1 Inst. step time # of increments 0 0 0 brightness value Bit [4] Bit [3] Bit [2] Table 6. LM8502 LED Mapping Instructions Bit [15] Bit [14] Bit [13] Bit [12] Bit [11] Bit [10] Bit [9] Bit [8] Bit [7] 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 mux_inc 1 0 0 1 1 1 0 1 1 0 0 0 0 mux_dec 1 0 0 1 1 1 0 1 1 1 0 0 0 mux_set 1 0 0 1 1 1 1 1 1 Inst. Bit [6] Bit [5] Bit [1] Bit [0] 0 0 0 0 0 0 0 0 0 LED/haptic select SRAM address 0 – 47 Table 7. LM8502 BRANCH Instructions Bit [15] Bit [14] Bit [13] Bit [12] Bit [11] Go to Start 0 0 0 0 0 Branch 1 0 1 Int 1 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 End 1 1 0 Int Reset 0 X X X X X X X X X X Trigger 1 1 1 ENGI NE2 ENGI NE1 ENG INE1 X Bit [1] Bit [0] Inst. Bit [10] Bit [9] Bit [8] Bit [7] Bit [6] Bit [5] Bit [4] 0 0 0 0 0 0 0 Loop count X X X Bit [2] Bit [1] Bit [0] 0 0 0 0 Step number Wait for a trigger Ext. trig Bit [3] Send a trigger Ext. trig X X ENGI NE2 X Table 8. LM8502 Variable Branch Instruction and Conditional Instructions Inst. Variable Branch Bit [15] Bit [14] Bit [13] Bit [12] Bit [11] Bit [10] Bit [9] 1 0 0 0 0 1 1 Bit [8] Bit [7] Bit [6] Bit [5] Bit [4] Bit [3] Bit [2] step number loop count jne (jump if not equal) 1 0 0 0 1 0 0 Number of instructions to be skipped if the operation returns true 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 variable 1 variable 2 Submit Documentation Feedback Copyright © 2009–2013, Texas Instruments Incorporated Product Folder Links: LM8502 15 LM8502 SNVS592D – OCTOBER 2009 – REVISED FEBRUARY 2013 www.ti.com Table 9. Data Transfer and Arithmetic Instructions Bit [15] Bit [14] Bit [13] Bit [12] ld 1 0 0 1 add 1 0 0 1 sub 1 0 0 1 Inst. Bit [15] Bit [14] Bit [13] Bit [12] Variable add 1 0 0 1 Variable sub 1 0 0 1 Inst. Bit [11] Bit [10] Bit [9] Bit [8] Bit [7] Bit [6] Bit [5] Bit [4] Bit [3] target variable 0 0 8-bit value target variable 0 1 8-bit value target variable 1 0 8-bit value Bit [2] Bit [1] Bit [0] Bit [2] Bit [1] Bit [0] Table 10. Arithmetic Instructions with Variables 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 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 11. 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 prescale sign Description step time 0 - 31 One ramp increment done in (step time) x (prescale). # of increments 0 - 255 The number of increment/decrement cycles Note: Value 0 takes the same time as increment 16 Submit Documentation Feedback Copyright © 2009–2013, Texas Instruments Incorporated Product Folder Links: LM8502 LM8502 www.ti.com SNVS592D – OCTOBER 2009 – REVISED FEBRUARY 2013 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. Table 12. FAST RAMP sign step size 0 Increase brightness output 1 Decrease brightness output 0–3 (0=2, 1=4, 2=8, 3=16) Value indicating how much the brightness is incremented in 0.49 ms 1–63 The number of increment/decrement cycles # of increments 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 13. RAMP with Variable Name Value (d) Description step time 0–3 0 = local variable A 1 = local variable B 2 = global variable C 2 3 = I C 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 cycles. 2 = global variable C 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): Submit Documentation Feedback Copyright © 2009–2013, Texas Instruments Incorporated Product Folder Links: LM8502 17 LM8502 SNVS592D – OCTOBER 2009 – REVISED FEBRUARY 2013 www.ti.com Table 14. 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 15. 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. 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 16. MUX_SEL Name Value (d) LED select 18 0 - 16 Submit Documentation Feedback Description 0 = no drivers selected 1 = LED1 selected 2 = LED2 selected ... 9 = LED9 selected 10 = LED10 selected 11 = haptic Copyright © 2009–2013, Texas Instruments Incorporated Product Folder Links: LM8502 LM8502 www.ti.com SNVS592D – OCTOBER 2009 – REVISED FEBRUARY 2013 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. 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. 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. 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. 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. Table 17. SET BRIGHTNESS Name Setting type Sign (only for relative setting) BRGT value Value (d) 0–1 0 = relative setting 1 = absolute setting 0–1 0 = increase brightness 1= decrease brightness 0–255 Description Defines how the brightness of mapped LED or haptic outputs is set Defines whether the brightness value is increased or decreased with the BRGT value BRGT output value 0 100% Submit Documentation Feedback Copyright © 2009–2013, Texas Instruments Incorporated Product Folder Links: LM8502 19 LM8502 SNVS592D – OCTOBER 2009 – REVISED FEBRUARY 2013 www.ti.com SET BRIGHTNESS with Variable Instruction Table 18. SET BRIGHTNESS with Variable Name Variable Value (d) 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 0–3 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 19. WAIT Name Value (d) Description 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 prescale time Total wait time will be = (time) x (prescale). Maximum 484 ms, minimum 0.488 ms 1– 31 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 20. 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 20 Submit Documentation Feedback Copyright © 2009–2013, Texas Instruments Incorporated Product Folder Links: LM8502 LM8502 www.ti.com SNVS592D – OCTOBER 2009 – REVISED FEBRUARY 2013 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 21. 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. 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 22. 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. 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. 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. 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. Submit Documentation Feedback Copyright © 2009–2013, Texas Instruments Incorporated Product Folder Links: LM8502 21 LM8502 SNVS592D – OCTOBER 2009 – REVISED FEBRUARY 2013 www.ti.com 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 23. 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 24. BRANCH Instruction with Variable Name step number Value (d) Description 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. Table 25. END Instruction Name Value 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 int 22 Description 0 Submit Documentation Feedback Copyright © 2009–2013, Texas Instruments Incorporated Product Folder Links: LM8502 LM8502 www.ti.com SNVS592D – OCTOBER 2009 – REVISED FEBRUARY 2013 Table 25. END Instruction (continued) Name Value reset Description 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 nonmapped drivers will remain. Brightness register values of the mapped drivers will be set to '0000 0000'. 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. Table 26. TRIGGER Instruction Name wait for a trigger send a trigger Value (d) 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 27. 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 Submit Documentation Feedback Copyright © 2009–2013, Texas Instruments Incorporated Product Folder Links: LM8502 23 LM8502 SNVS592D – OCTOBER 2009 – REVISED FEBRUARY 2013 www.ti.com 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 28. Assign Value to Variable Name target variable 8–bit value Value (d) 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 29. 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 30. ADD 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 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 31. SUB with Numerical Operands Name Value (d) target value 0–2 8–bit value 0–255 24 Submit Documentation Feedback Description 0 = variable A 1 = variable B 2 = variable C The value to be subtracted Copyright © 2009–2013, Texas Instruments Incorporated Product Folder Links: LM8502 LM8502 www.ti.com SNVS592D – OCTOBER 2009 – REVISED FEBRUARY 2013 Table 32. 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 34. These different modes control the direction of vibra motor. The PWM control sets the speed of the motor. See Figure 18 and Table 33 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. Submit Documentation Feedback Copyright © 2009–2013, Texas Instruments Incorporated Product Folder Links: LM8502 25 LM8502 SNVS592D – OCTOBER 2009 – REVISED FEBRUARY 2013 www.ti.com VOUT A-channel B-channel Motor Figure 18. Table 33. H-Bridge Truth Table PFET Left A-channel NFET Left A-channel PFET Right B-channel N-fet Right B-channel 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 34. 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). 26 Submit Documentation Feedback Copyright © 2009–2013, Texas Instruments Incorporated Product Folder Links: LM8502 LM8502 www.ti.com SNVS592D – OCTOBER 2009 – REVISED FEBRUARY 2013 Haptic feedback control register Vboost Haptic PWM duty cycle register pwm_p Haptic PWM generator Trig Channel A H-Bridge pwm_n Channel B Vibra Motor Clk_2 MHz Engine controlling PWM duty cycle 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 35. Group Fader Registers (48H, 49H and 4AH) Ambient Light Sensing and Targer Light Calculation Target Light Ambient Light Calculation Ambient Light Calculation Result Dynamic Backlight Control LED Mapping PWM INPUT (pin) Engine Control (via Haptic) Figure 19. Ambient Light Sensing Table 35. 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). Submit Documentation Feedback Copyright © 2009–2013, Texas Instruments Incorporated Product Folder Links: LM8502 27 LM8502 SNVS592D – OCTOBER 2009 – REVISED FEBRUARY 2013 www.ti.com 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 22.) 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. Table 36. Ambient Light Truth Table: How ALS and PWM Enables Affect Group of LED Outputs Grouping ALS_en PWM_en no works only when LED outputs grouped works only when LED outputs grouped Current value mapped to LED outputs 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 LED outputs controlled through register or lighting engine 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 37. Table 37. 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 Ambient Light Sensing and Target Light Calculation A/D Zone Averager Zline 0 8 bits Zline 1 Zline 2 Input light zone definition registers Zline 3 User selectable with typical defaults Z0 target light Z1 target light Z2 target light Z3 target light Z4 target light Discriminator 8 bits 8 bits 8 bits 8 bits 8 bits 0 1 7 bits 2 3 ALS Target Value To Ambient Light Calculation 4 User selectable with typical defaults Figure 20. Ambient Light Sensing and Target Light Calculation 28 Submit Documentation Feedback Copyright © 2009–2013, Texas Instruments Incorporated Product Folder Links: LM8502 LM8502 www.ti.com SNVS592D – OCTOBER 2009 – REVISED FEBRUARY 2013 Ambient Light Calculation Value selected for Ramp Control Ramp from previous value to Target value ALS_EN_G1 bit selection Group 1 fader value 0 0 Ambient Light Calculation results to Dynamic Backlight Control (if enabled) or directly to LED Mapping (when DBC disabled) Ramp control X - 1 1 Group 1 fade times ALS_EN_G2 bit selection Group 2 fader value 0 0 Ramp control X 1 Group 2 fade times - ALS Target Value from Ambient Light Sensing and Target Light Calculation 1 ALS_EN_G3 bit selection Group 3 fader value 0 0 Ramp control X - 1 1 Group 3 fade times Figure 21. Ambient Light Calculation Submit Documentation Feedback Copyright © 2009–2013, Texas Instruments Incorporated Product Folder Links: LM8502 29 LM8502 SNVS592D – OCTOBER 2009 – REVISED FEBRUARY 2013 PWM_SEL_G1 www.ti.com Dynamic Backlight Control 0 - X 1 PWM_SEL_G2 Inputs from Ambient Light Calculation 0 LED Mapping - X 1 PWM_SEL_G3 0 - X 1 PWM Input ± pin Dynamic Backlight Control Figure 22. 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 38to 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. Table 38. ALS Start Zone Selection 30 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 Submit Documentation Feedback Copyright © 2009–2013, Texas Instruments Incorporated Product Folder Links: LM8502 LM8502 www.ti.com SNVS592D – OCTOBER 2009 – REVISED FEBRUARY 2013 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 39. 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 Vals_ref=1V Zone 4 Zone 3 Zline 2 Zline 1 LED Current Vsense Zline 3 Zone 2 Zline 0 Zone 1 Zone 0 Z0T Ambient Light (lux) Z1T Z2T Z3T Z4T Percentage of full scale Table 40. 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 41. Zline 1 (Threshold 1 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 42. 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 43. 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 Submit Documentation Feedback Copyright © 2009–2013, Texas Instruments Incorporated Product Folder Links: LM8502 31 LM8502 SNVS592D – OCTOBER 2009 – REVISED FEBRUARY 2013 www.ti.com Table 44. 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 45. 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 46. 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 47. 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 48. 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 49 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 49. General Purpose ADC Conversion Table 32 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 01100 Indicator LED Output 01101 Not used 01110 Not used 01111 VOUT 10000 ALS1 input Submit Documentation Feedback Copyright © 2009–2013, Texas Instruments Incorporated Product Folder Links: LM8502 LM8502 www.ti.com SNVS592D – OCTOBER 2009 – REVISED FEBRUARY 2013 Table 49. General Purpose ADC Conversion Table (continued) 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 50. 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 51 displays latency information for different PWM minimum frequency selections. Minimum frequency can be selected from DBC control register 1DH. Table 51. 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. Submit Documentation Feedback Copyright © 2009–2013, Texas Instruments Incorporated Product Folder Links: LM8502 33 LM8502 SNVS592D – OCTOBER 2009 – REVISED FEBRUARY 2013 www.ti.com 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 Power-save 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. 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. Powersave mode if brightness = 0 longer than 50 ms LED brightness POWER SAVE POWERSAVE Time Chip current consumption (LED current not included) Time Figure 23. 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. 34 Submit Documentation Feedback Copyright © 2009–2013, Texas Instruments Incorporated Product Folder Links: LM8502 LM8502 www.ti.com SNVS592D – OCTOBER 2009 – REVISED FEBRUARY 2013 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. 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 52. 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 one-time 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. Submit Documentation Feedback Copyright © 2009–2013, Texas Instruments Incorporated Product Folder Links: LM8502 35 LM8502 SNVS592D – OCTOBER 2009 – REVISED FEBRUARY 2013 www.ti.com 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 I2Ccompatible 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 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. PDISS = (VOUT ± VIN) x VOUT VIN 2 x RNFET + VOUT VIN x RPFET x ILOAD2 + PDISSLED PDISSLED = (VOUT ± VFLASH) x IFLASH + (VOUT ± VIND) x IIND + (VOUT ± VLEDS) x ILEDS ILOAD = IOUT + IFLASH + IIND + ILEDS IFLASH = IFLASH1 + IFLASH2 (1) 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. 36 Submit Documentation Feedback Copyright © 2009–2013, Texas Instruments Incorporated Product Folder Links: LM8502 LM8502 www.ti.com SNVS592D – OCTOBER 2009 – REVISED FEBRUARY 2013 FLASH Flash Brightness Register Flash mode Brightness Fader (16 Ps/step) Brightness control to flash driver Torch mode Flash control signal Torch Brightness Register External pins Flash control via external pins STROBE, TX1, TX2, NTC or via i2c regs or via VIN Monitor Strobe TX1 TX2 NTC Timeout Counter Flash Control VIN Monitor Flash_stop I2C Registers Flash_stop Flash time out register 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 53. 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 Table 54. Flash Registers Register Bit [7] Bit [6] TORCH BRIGHTNESS A0H INDICATOR LED CURRENT FLASH BRIGHTNESS B0H STR FLASH DURATION C0H Bit [5] UVLO FLAG CONFIG REGISTER 1 E0H TX1/TORCH CONFIG REGISTER 2 F0H UVLO_LEVEL Bit [3] FLASH CURRENT CURRENT LIMIT FLAG REGISTER D0H Bit [4] TORCH CURRENT NTC FLAG TX2 POLARIT Y Bit [2] Bit [1] Bit [0] VM EN1 EN0 VM EN1 EN0 FLASH TIMEOUT TX2 FLAG TX1 FLAG FLASH LED TSD FLAG FAULT FLAHS TIMEOUT FLAG TX2_PIN_CO NTC_HYS LEDI_NTC NFIG T DIS_EXT_S VM_VALUE DIS_PFM TROBE EN_UVLO AET_MODE NTC_MOD E EN_NTC_I UVLO_MOD NTERRUP E T TX2 SHUTDOW N Submit Documentation Feedback Copyright © 2009–2013, Texas Instruments Incorporated Product Folder Links: LM8502 37 LM8502 SNVS592D – OCTOBER 2009 – REVISED FEBRUARY 2013 www.ti.com 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 55). 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 55. 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 56). 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. Table 56. Torch Currents 38 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 Submit Documentation Feedback Copyright © 2009–2013, Texas Instruments Incorporated Product Folder Links: LM8502 LM8502 www.ti.com SNVS592D – OCTOBER 2009 – REVISED FEBRUARY 2013 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 I2Ccompatible 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 rewritten 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. Submit Documentation Feedback Copyright © 2009–2013, Texas Instruments Incorporated Product Folder Links: LM8502 39 LM8502 SNVS592D – OCTOBER 2009 – REVISED FEBRUARY 2013 www.ti.com 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. 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. 40 Submit Documentation Feedback Copyright © 2009–2013, Texas Instruments Incorporated Product Folder Links: LM8502 LM8502 www.ti.com SNVS592D – OCTOBER 2009 – REVISED FEBRUARY 2013 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. LM8502 Timing Diagrams I2C Torch Command Default State Flash Brightness Register bit 7 (STR) = 0 Configuration Register bit 7 (TX1/TORCH) = 0 Configuration Register bit 6 (TX2 Polarity) = 1 Configuration Register bit 5 (ENVM/TX2) = 0 Flash Duration bit 7 (SEM) = 0 STROBE I FLASH I TORCH I LED Timeout Duration Normal Torch to Flash Operation (Default, Power On or RESET state of LM8502) TX1/TORCH STROBE Default State (TX event during a STROBE event) I FLASH I TORCH I LED Timeout Duration TX1 Event During a Flash Event (Default State,TX1/TORCH is an Active High TX Input) TX1/TORCH STROBE I LED Default State (TX1 event before and after STROBE event) I TORCH Timeout Duration TX1 Event Before and After Flash Event (Default State, TX1/TORCH is an Active High TX Input Submit Documentation Feedback Copyright © 2009–2013, Texas Instruments Incorporated Product Folder Links: LM8502 41 LM8502 SNVS592D – OCTOBER 2009 – REVISED FEBRUARY 2013 www.ti.com I2C Torch Command Default State STROBE goes high and the LEDs turn on into Flash mode. LEDs will turn off at the end of timeout duration or when STROBE goes low. Everytime STROBE goes high the timeout resets. STROBE I FLASH I TORCH ILED Timeout Duration Start of Timeout Counter Timeout Counter Reset STROBE Input is Level Sensitive (Default State, STR bit = 0) I2C Torch Command STROBE Flash Brightness Register bit 7 (STR) = 1 STROBE goes high and the LEDs turn on into Flash mode. LEDs will stay on for the timeout duration even if STROBE goes low before. IFLASH I TORCH I LED Timeout Duration STROBE Input is Edge Sensitive (STR bit = 1) I2C Torch Command ENVM/TX2 ENVM/TX2 as a transmit interrupt Configuration Register bit 5 (ENVM/TX2) = 1 (ENVM/TX2 operates as a transmit interrupt ) STROBE I FLASH I TORCH ILED Timeout Duration ENVM/TX2 Pin is Configured as an Active High TX Input 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. 42 Submit Documentation Feedback Copyright © 2009–2013, Texas Instruments Incorporated Product Folder Links: LM8502 LM8502 www.ti.com SNVS592D – OCTOBER 2009 – REVISED FEBRUARY 2013 SCL SDA data change allowed data valid data change allowed data valid data change allowed Figure 24. 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. SDA SCL S P Start Condition Stop Condition Figure 25. 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. t1 SCL t5 t4 SDA_IN t2 SDA_OUT t3 Figure 26. I2C-Compatible Timing 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. Submit Documentation Feedback Copyright © 2009–2013, Texas Instruments Incorporated Product Folder Links: LM8502 43 LM8502 SNVS592D – OCTOBER 2009 – REVISED FEBRUARY 2013 www.ti.com 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. ack from slave ack from slave ack from slave start MSB Chip Addr LSB w ack MSB Register Addr LSB ack MSB Data LSB ack stop start id = 33h w ack addr = 40h ack address 40h data ack stop SCL SDA (w = write; SDA = '0'), id = device address = 33H for LM8502 Figure 27. Write Cycle ack from slave start MSB Chip Addr LSB w ack from slave MSB Register Addr LSB repeated start ack from slave data from slave nack from master rs MSB Chip Address LSB rs id = 33h r MSB Data LSB stop address 3Fh data nack stop SCL SDA start id =33h w ack address = 3Fh ack r ack ( 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. Figure 28. Read Cycle I2C-COMPATIBLE CHIP ADDRESS The device address for the LM8502 is '0011 0011' (33H). After the START condition, the I2C master sends the 7bit 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. MSB 1 Bit 7 LSB 0 Bit 6 1 Bit 5 0 Bit 4 0 Bit 3 1 Bit 2 1 Bit 1 R/W Bit 0 2 I C Slave Address (chip address) Figure 29. Device Address AUTO INCREMENT FEATURE The auto increment feature allows writing several consecutive registers within one transmission. Every time an 8bit 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. 44 Submit Documentation Feedback Copyright © 2009–2013, Texas Instruments Incorporated Product Folder Links: LM8502 LM8502 www.ti.com SNVS592D – OCTOBER 2009 – REVISED FEBRUARY 2013 Table 57. Auto Increment Example Master Start Device Address = 33H Register Address Write LM8502 ACK Data ACK Data ACK Stop ACK Register Descriptions The LM8502 is controlled with set of registers through the I2C-compatible interface. Table 58 below lists device registers, their addresses and abbreviations. Table 58. Detailed Register Descriptions Hex Address Register Name Bit(s) in Use [6] 00 ENABLE/ENGINE CNTRL1 [5:4] [3:2] 01 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 Submit Documentation Feedback Copyright © 2009–2013, Texas Instruments Incorporated Product Folder Links: LM8502 45 LM8502 SNVS592D – OCTOBER 2009 – REVISED FEBRUARY 2013 www.ti.com Table 58. Detailed Register Descriptions (continued) [7:4] R/W 0000 FADE_IN Fade in time for groups 1 – 3 See fade_in times in (1) [3:0] R/W 0000 FADE_OUT Fade out time for groups 1 – 3 See fade_out times in (1) GROUPS 1 – 3 FADING 02 – 04 [7:6] 06 – 0F (1) 46 00 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 LED 1 – 10 CONTROL [5] 10 R/W 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. HAPTIC_CONTROL R/W [4:3] R/W 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] R/W 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. [7:6] R/W Register I2C write has an effect when device is in Normal mode. Submit Documentation Feedback Copyright © 2009–2013, Texas Instruments Incorporated Product Folder Links: LM8502 LM8502 www.ti.com SNVS592D – OCTOBER 2009 – REVISED FEBRUARY 2013 Table 58. Detailed Register Descriptions (continued) [7:5] 11 ALS_CONTROL R/W 000 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 [4:3] R/W 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. [2] R/W 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 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 Submit Documentation Feedback Copyright © 2009–2013, Texas Instruments Incorporated Product Folder Links: LM8502 47 LM8502 SNVS592D – OCTOBER 2009 – REVISED FEBRUARY 2013 www.ti.com Table 58. Detailed Register Descriptions (continued) [7:6] [5:3] 1D R/W R/W 00 PWM_MIN_FREQ Minimum frequency setting for PWM: 00 = 100 Hz 01 = 500 Hz 10 = 1 kHz 11 = 5 kHz 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] R/W R/W HAPTIC FEEDBACK CONTROL 21 [2:0] R/W 000 22 HAPTIC PWM DUTY CYCLE [7:0] R/W 00000000 PWM_HAPT Haptic feedback duty cycle setting 26 — 2F LED1 – 10 CURRENT CONTROL [7:0] R/W 00000000 CURRENT LED outputs 1– 10 current control (2) 48 (2) . Register I2C write has an effect when device is in Normal mode. Submit Documentation Feedback Copyright © 2009–2013, Texas Instruments Incorporated Product Folder Links: LM8502 LM8502 www.ti.com SNVS592D – OCTOBER 2009 – REVISED FEBRUARY 2013 Table 58. Detailed Register Descriptions (continued) [7:4] 35 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] R/W 0000 [7] R/W 0 VAR_INPUT_SEL variable input selection: 0 = Variable D from I2C register 1 = Variable D from ADC [6] R/W 0 MASK_ALS_ZONE_INT Masks the interrupt: 0 = interrupt comes from ALS zone change 1 = interrupt comes from engines [5] R/W 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 [3] 36 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 MISC [2] R/W [1] R/W 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 [0] R/W 0 INT_CLK_EN Clock source selection: 1 = internal clock in use 0 = external clock in use Submit Documentation Feedback Copyright © 2009–2013, Texas Instruments Incorporated Product Folder Links: LM8502 49 LM8502 SNVS592D – OCTOBER 2009 – REVISED FEBRUARY 2013 www.ti.com Table 58. Detailed Register Descriptions (continued) 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. [7] R/W 0 EN_ADC Enables general purpose ADC: 0 = general purpose ADC disabled 1 = general purpose ADC enabled [6] R/W 0 EN_ADC_INT Enables interrupt from general purpose ADC: 0 = No interrupt from ADC 1 = Interrupt generated from ADC of conversion [5] R/W 0 CONTINUOUS_CONV Enables continuous conversion of the ADC: 0 = Continuous conversion disabled 1= Continuous conversion enabled 3A STATUS/INTERRUPT 3B 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 41 ADC CONTROL [4:0] R/W 00000 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. 50 Submit Documentation Feedback Copyright © 2009–2013, Texas Instruments Incorporated Product Folder Links: LM8502 LM8502 www.ti.com SNVS592D – OCTOBER 2009 – REVISED FEBRUARY 2013 Table 58. Detailed Register Descriptions (continued) 4F PROG MEM PAGE SEL [1:0] R/W 00 50 – 6F PROGRAM MEMORY [7:0] R/W 00000000 [7:6] [5:3] A0 R/W [1:0] [7] FLASH BRIGHTNESS R/W R/W R/W Program memory for instructions. Every instruction is 16 bits long. 01 IND_CURRENT Indicator LED current: 00 = 2.3 mA 01 = 4.6 mA 10 = 7.9 mA 11 = 9.2 mA 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 TORCH BRIGHTNESS [2] B0 R/W SRAM memory page selection 0 VM Voltage mode enable: 0 = Voltage mode disabled 1= Voltage mode enabled 00 EN1–0 Flash/torch enable: 00 = Flash shutdown 01 = Indicator mode 10 = Torch mode 11 = Fash mode 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. 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 [6:3] R/W 1101 [2] R/W 0 VM Voltage mode enable: 0 = Voltage mode disabled 1= Voltage mode enabled 00 EN1–0 Flash/Torch enable: 00 = Flash shutdown 01 = Indicator mode 10 = Torch mode 11 = Flash mode [1:0] R/W Submit Documentation Feedback Copyright © 2009–2013, Texas Instruments Incorporated Product Folder Links: LM8502 51 LM8502 SNVS592D – OCTOBER 2009 – REVISED FEBRUARY 2013 www.ti.com Table 58. Detailed Register Descriptions (continued) [6:5] C0 10 FLASH DURATION [4:0] [7] 52 R/W R/W R 01111 0 CURRENT_LIMIT Selects Flash peak current limit: 00 = 1A 01 = 1.5A 10 = 2A 11 = 2.5A 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 UVLO_FLAG Indicates the status of VIN pin: 0 = VIN above UVLO threshold 1 = Voltage Monitor enabled and VIN falls below programmed UVLO threshold Submit Documentation Feedback Copyright © 2009–2013, Texas Instruments Incorporated Product Folder Links: LM8502 LM8502 www.ti.com SNVS592D – OCTOBER 2009 – REVISED FEBRUARY 2013 Table 58. Detailed Register Descriptions (continued) [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 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 [3] D0 R FLAG REGISTER [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 Submit Documentation Feedback Copyright © 2009–2013, Texas Instruments Incorporated Product Folder Links: LM8502 53 LM8502 SNVS592D – OCTOBER 2009 – REVISED FEBRUARY 2013 www.ti.com Table 58. Detailed Register Descriptions (continued) [7] [6] E0 54 CONFIG REG 1 R/W 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 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 Submit Documentation Feedback Copyright © 2009–2013, Texas Instruments Incorporated Product Folder Links: LM8502 LM8502 www.ti.com SNVS592D – OCTOBER 2009 – REVISED FEBRUARY 2013 Table 58. Detailed Register Descriptions (continued) [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 0 EN_NTC_INTERRUPT Disables/Enables possibility to send interruption in NTC event: 0 = interrupt disabled 1 = interrupt enabled 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 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 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 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 0 ALS_ZONE_DATA Indicates ALS zone: 000 = Zone 0 001= Zone 1 010 = Zone 2 011 = Zone 3 100 = Zone 4 [4] [3] F0 R/W CONFIG REG 2 [2] [1] [0] 97 R/W ALS_ZONE_DATA [2:0] R/W R/W R/W R Submit Documentation Feedback Copyright © 2009–2013, Texas Instruments Incorporated Product Folder Links: LM8502 55 LM8502 SNVS592D – OCTOBER 2009 – REVISED FEBRUARY 2013 www.ti.com APPLICATION 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 fullscale 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. 56 Submit Documentation Feedback Copyright © 2009–2013, Texas Instruments Incorporated Product Folder Links: LM8502 LM8502 www.ti.com SNVS592D – OCTOBER 2009 – REVISED FEBRUARY 2013 2.2 PH VIN = 2.7V TO 5.5V 10 PF OUT SW D1 VDD D2 10 PF D3 TX1/TORCH STROBE D4 PWM/ENVM/TX2 D5 ALS1 D6 Main Display D7 Interrupt INT External clock input for power saving CLK Trigger pin for lighting engine TRIG LM8502 D8 Sub Display D9 D10/ALS2 VBIAS FLASH1 SCL FLASH2 Flash 1.2A SDA LEDI/NTC EN GND Figure 30. LED Outputs Grouped into Main and Sub Displays Submit Documentation Feedback Copyright © 2009–2013, Texas Instruments Incorporated Product Folder Links: LM8502 57 LM8502 SNVS592D – OCTOBER 2009 – REVISED FEBRUARY 2013 www.ti.com 2.2 PH VIN = 2.7V TO 5.5V 10 PF OUT SW D1 VDD D2 10 PF D3 TX1/TORCH STROBE D4 PWM/ENVM/TX2 D5 ALS1 D6 VLEDS D7 Interrupt INT External clock input for power saving CLK Trigger pin for lighting engine TRIG LM8502 D8 D9 D10/ALS2 VBIAS FLASH1 SCL FLASH2 Flash 1.2A SDA LEDI/NTC EN GND Figure 31. LED Outputs Partially Powered from External Voltage Supply 58 Submit Documentation Feedback Copyright © 2009–2013, Texas Instruments Incorporated Product Folder Links: LM8502 LM8502 www.ti.com SNVS592D – OCTOBER 2009 – REVISED FEBRUARY 2013 2.2 PH VIN = 2.7V TO 5.5V 10 PF OUT SW D1 VDD D2 10 PF D3 TX1/TORCH STROBE D4 PWM/ENVM/TX2 D5 ALS1 D6 D7 Interrupt INT External clock input for power saving CLK Trigger pin for lighting engine TRIG LM8502 VIN D8 D9 D10/ALS2 VBIAS FLASH1 SCL FLASH2 Flash 1.2A SDA LEDI/NTC EN GND Figure 32. Two Ambient Light Sensors using Internal Resistors, One Flash LED with Thermal Sensing Submit Documentation Feedback Copyright © 2009–2013, Texas Instruments Incorporated Product Folder Links: LM8502 59 LM8502 SNVS592D – OCTOBER 2009 – REVISED FEBRUARY 2013 www.ti.com 2.2 PH VIN = 2.7V TO 5.5V 10 PF OUT SW D1 VDD D2 10 PF D3 TX1/TORCH STROBE D4 PWM/ENVM/TX2 D5 ALS1 D6 VIN D7 Interrupt External clock input for power saving INT LM8502 CLK D8 D9 D10/ALS2 Trigger pin for lighting engine TRIG VBIAS FLASH1 SCL FLASH2 Flash 1.2A SDA LEDI/NTC EN GND Figure 33. Two Ambient Light sensors using External Resistors, One Flash LED with Thermal Sensing 60 Submit Documentation Feedback Copyright © 2009–2013, Texas Instruments Incorporated Product Folder Links: LM8502 LM8502 www.ti.com SNVS592D – OCTOBER 2009 – REVISED FEBRUARY 2013 2.2 PH VIN = 2.7V TO 5.5V 10 PF OUT SW D1 VDD D2 10 PF D3 TX1/TORCH STROBE D4 PWM/ENVM/TX2 D5 ALS1 D6 LM8502 Interrupt External clock input for power saving D7 D8 INT D9 CLK D10/ALS2 Trigger pin for lighting engine TRIG VIBRAP SCL VIBRAN SDA M Vibra motor LEDI/NTC EN GND Figure 34. Vibra Motor connected to Haptic Feedback Outputs Submit Documentation Feedback Copyright © 2009–2013, Texas Instruments Incorporated Product Folder Links: LM8502 61 LM8502 SNVS592D – OCTOBER 2009 – REVISED FEBRUARY 2013 www.ti.com 2.2 PH VIN = 2.7V TO 5.5V 10 PF OUT SW D1 VDD D2 10 PF D3 TX1/TORCH AIN STROBE D4 PWM/ENVM/TX2 D5 ALS1 D6 INT 470 nF 47k D7 LM8502 External clock input for power saving CLK Trigger pin for lighting engine TRIG D8 D9 D10/ALS2 FLASH1 SCL VBIAS FLASH2 Flash 1.2A SDA LEDI/NTC EN GND Figure 35. Audio Synchronization Connection (external components needed) for Rectifying the Audio Signal (diode) and RC-filter 62 Submit Documentation Feedback Copyright © 2009–2013, Texas Instruments Incorporated Product Folder Links: LM8502 LM8502 www.ti.com SNVS592D – OCTOBER 2009 – REVISED FEBRUARY 2013 2.2 PH 10 PF OUT SW D1 VDD D2 10 PF D3 TX1/TORCH STROBE D4 PWM/ENVM/TX2 D5 ALS1 D6 LM8502 D7 D8 INT Interrupt Pull-up resistor D9 CLK P channel FET D10/ALS2 Trigger pin for lighting engine TRIG VIBRAP SCL VIBRAN P channel FET SDA LEDI/NTC EN M GND Vibra motor Figure 36. Flash and Vibra Motor together (two external FETs needed); Functionality Selected with LED Output 10 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 on-time 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: 'VQ = ILED x (VOUT - VIN) fSW x VOUT x COUT (2) The output voltage ripple due to the output capacitors ESR is found by: 'VESR = R ESR x § © where 'IL = I LED x VOUT· VIN ¹ + 'I L VIN x (VOUT - VIN ) 2 x f SW x L x VOUT (3) Submit Documentation Feedback Copyright © 2009–2013, Texas Instruments Incorporated Product Folder Links: LM8502 63 LM8502 SNVS592D – OCTOBER 2009 – REVISED FEBRUARY 2013 www.ti.com 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 59 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 59 lists various input capacitors that or recommended for use with the LM8502. Table 59. 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 60 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: I LOAD VOUT VIN x (VOUT - VIN) IPEAK = K x VIN + 'IL where 'IL = 2 x f SW x L x VOUT (4) ƒSW = 2MHz, and efficiency can be found in the Typical Performance Characteristics plots. Table 60. Recommended Inductors Manufacturer L Part Number Dimensions (L×W×H) ISAT Coilcraft 2.2 µH LPS3015–222 3mm×3mm×1.2mm 2.3A TDK 2.2 µH VLS252012T-2R2M1R3 2mm×2.5mm×1.2mm 1.5A NTC Thermistor Selection NTC thermistors have a temperature to resistance relationship of: E R(T) = R25°C x e § 1 - 1· ©T °C+ 273 298¹ (5) where β is given in the thermistor datasheet and R25°C is the thermistors value at +25°C. R3 in Figure 38 is chosen so that it is equal to: R3 = RT( TRIP) (VBIAS - VTRIP ) VTRIP (6) where R(T)TRIP is the thermistor's value at the temperature trip point, VBIAS is shown in Figure 37, and VTRIP = 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: 64 Submit Documentation Feedback Copyright © 2009–2013, Texas Instruments Incorporated Product Folder Links: LM8502 LM8502 www.ti.com SNVS592D – OCTOBER 2009 – REVISED FEBRUARY 2013 E R3 is then: º » ¼ R(T) = 100 k : x e º 1 - 1 » 93 + 273 298 ¼ = 6.047 k : 6.047 k: x (2.5 V - 1V) = 9 .071 k: 1V (7) Figure 37 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. 1.5 VBIAS = 2.5V, RTHERMISTOR = 100 k: @ +25°C, B = 4500, R3 = 9 k: 1.4 1.3 V LEDI/NTC (V) 1.2 1.1 1 0.9 0.8 0.7 0.6 0.5 70 75 80 85 90 95 100 105 110 TEMPERATURE (°C) Figure 37. 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. T( °C) = 298°C x LN E x 298°C VTRIP x R3 (VBIAS - VTRIP) x R25 °C 273°C +E (8) 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 38 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. Submit Documentation Feedback Copyright © 2009–2013, Texas Instruments Incorporated Product Folder Links: LM8502 65 LM8502 SNVS592D – OCTOBER 2009 – REVISED FEBRUARY 2013 www.ti.com Internal to LM8502 TX2 TX1/ TORCH Force Torch or LED Shutdown (TX2 or NTC only) VBIAS 1V R3 R(T) + LEDI/NTC 125 mV Hysteresis, Configuration Register 1 bit [4] = 0 250 mV Hysteresis, Configuration Register 1 bit [4] = 1 Figure 38. Thermistor Voltage Divider and Sensing Circuit 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. 66 Submit Documentation Feedback Copyright © 2009–2013, Texas Instruments Incorporated Product Folder Links: LM8502 LM8502 www.ti.com SNVS592D – OCTOBER 2009 – REVISED FEBRUARY 2013 REVISION HISTORY Changes from Revision C (February 2013) to Revision D • Page Changed layout of National Data Sheet to TI format .......................................................................................................... 66 Submit Documentation Feedback Copyright © 2009–2013, Texas Instruments Incorporated Product Folder Links: LM8502 67 PACKAGE OPTION ADDENDUM www.ti.com 10-Dec-2020 PACKAGING INFORMATION Orderable Device Status (1) Package Type Package Pins Package Drawing Qty Eco Plan (2) Lead finish/ Ball material MSL Peak Temp Op Temp (°C) Device Marking (3) (4/5) (6) LM8502TME/NOPB ACTIVE DSBGA YFQ 30 250 RoHS & Green SNAGCU Level-1-260C-UNLIM -30 to 85 8502 LM8502TMX/NOPB ACTIVE DSBGA YFQ 30 3000 RoHS & Green SNAGCU Level-1-260C-UNLIM -30 to 85 8502 (1) The marketing status values are defined as follows: ACTIVE: Product device recommended for new designs. LIFEBUY: TI has announced that the device will be discontinued, and a lifetime-buy period is in effect. NRND: Not recommended for new designs. Device is in production to support existing customers, but TI does not recommend using this part in a new design. PREVIEW: Device has been announced but is not in production. Samples may or may not be available. OBSOLETE: TI has discontinued the production of the device. (2) RoHS: TI defines "RoHS" to mean semiconductor products that are compliant with the current EU RoHS requirements for all 10 RoHS substances, including the requirement that RoHS substance do not exceed 0.1% by weight in homogeneous materials. Where designed to be soldered at high temperatures, "RoHS" products are suitable for use in specified lead-free processes. TI may reference these types of products as "Pb-Free". RoHS Exempt: TI defines "RoHS Exempt" to mean products that contain lead but are compliant with EU RoHS pursuant to a specific EU RoHS exemption. Green: TI defines "Green" to mean the content of Chlorine (Cl) and Bromine (Br) based flame retardants meet JS709B low halogen requirements of
LM8502TMX/NOPB 价格&库存

很抱歉,暂时无法提供与“LM8502TMX/NOPB”相匹配的价格&库存,您可以联系我们找货

免费人工找货
LM8502TMX/NOPB
    •  国内价格
    • 1000+13.97000

    库存:0