LED fine adjustment


I am working on ADPD188BI with chamber and have some questions.

1) In normal surrounding mode, I got this value from FIFO.

   BLUE: 415  IR: 1283

2) And I changed the value of 0x25 register to 0x631F from 0x630c to increase blue output value.

   But the result was same like before.

3) Also I changed the value of 0x25 register to 0x6300 from 0x630c to decrease blue output value.

   But the result was same like before.

Do you know why the output value of blue doesn't change ?

The register setting values are as below.

0x000F0001, //#SW Reset /* OK HONG */
0x0001c0ff, //# Fifo int on /* OK HONG */
0x00020005, //# int pin as output (inverted for M4 interface)/* OK HONG */
0x00060001, //# Restore Default
0x00100001, //# IDLE
0x001130A9, //# Will be overwritten by tool
//0x00113065, //# Will be overwritten by tool 16bit
0x004f2090, //# Restore Default
0x005F0000, //# Default
0x00120200, //# 16Hz
0x00150000, //# No Averaging
0x0014011D, //# Blue LED Slot A, IR Slot B, combine detectors
0x00180000, //# no offset
0x00193fff, //# unused channel
0x001a3fff, //# unused channel
0x001b3fff, //# unused channel
0x00300320, //# 3us LED pulse
0x0031040E, //# 4 pulses
//0x0031080E, //# 8 pulses
0x003922F0, //# 4uS AFE
0x00421C34, //# 200K tia
0x0043ada5, //# Full AFE
0x005e0808, //# Standard
0x00163000, //# No Dark Bits
0x00170009, //# Chop -++-
0x001e0000, //# no offset
0x001f3fff, //# unused channel
0x00203fff, //# unused channel
0x00213fff, //# unused channel
0x00350320, //# 3us LED pulse
0x0036040e, //# 4 pulses
0x003b22F0, //# 4uS AFE
0x00441C34, //# 200K tia
0x0045ada5, //# Full AFE
0x00590808, //# Standard
0x001c3000, //# No Dark Bits
0x001d0009, //# Chop -++-
0x00580544, //# -++-
0x00223539, //# LED3 IR
0x00233536, //# LED1 Blue
0x00241530, //# LED2 unused
0x0025630c, //# default trim
0x00540aa0, //# Cathodes to vdel
0x004b269A, //# Adjust per Device
0x004d0090, //# Adjust Per Device

Thank you.



  • 0
    •  Analog Employees 
    on Aug 14, 2020 12:36 PM 3 months ago


    If you just change 0x23 bits [3:0], which is ILED1_COARSE, does the blue channel value change?

  • No, It didn't change. But the blue channel value increased if I changed 0x31 from 0x040E to 0x080E to increase the number

    blue pulse.

  • 0
    •  Analog Employees 
    on Aug 18, 2020 1:15 PM 3 months ago in reply to hsy

    The number of pulses doesn't mean anything in this case because pulses are just summation of ADC conversions in the digital block. So, even if you measure dark, the number of codes will increase with increasing pulse number. 

    All the settings seem to match for two timeslots and IR codes change with changing LED settings but not the blue one. So, are you sure that LED is turned on at all? 

    You could start with just measuring the supply voltage to ensure that it is actually supplying voltage to VLED1 pin. If it supplies proper voltage(which is 5 V), do the following:

    To check the actual current, you can check the current between VLED1 pin and the supply voltage. In the ADPD188BI eval board, there is a zero ohm resistor (R8). If you change that resistor to 1 ohm or 5 ohms, you could measure the differential voltage on that resistor, which will indicate the actual forward current on the blue LED. For that, you will need a differential oscilloscope probe across that resistor. Then, the voltage reading becomes:

    V = I(led) * R

    where R is the 1 ohm or 5 ohms resistor and V is the voltage reading on the oscilloscope. Since ADPD188BI uses a pulsing scheme, you cannot measure with a simple multimeter. You will have to see the actual pulse current, so you have to use an oscilloscope and a differential probe to accurately measure the current. 

    While hooked up to the probe, you can change the LED current register settings and see if it moves at all.

  • Thank you for your help.

    Actually, the input voltage of blue led was 3.3V and red was 5V which were wrong.

    So we changed the input voltage of blue led from 3.3V to 5V and red from 5v to 3.3.

    After that, the blue output value changed according to current setting value.

    But  unfortunately, the red value didn't. Do you have any idea about this problem ?

    Thank you.

  • I found the reason why I couldn't change the current of IR.

    Actually, I used to this function "AdpdDrvSetLedCurrent()" to adjust the current.

    And the function doesn't consider about LED3(IR) but only LED1(BLUE) , LED2 like below.

    int16_t AdpdDrvSetLedCurrent(uint8_t nLedCurrent, AdpdLedId nLedId)


         nReg = REG_LED1_DRV + (nLedId - 1);

         if (!((nReg == REG_LED1_DRV) || (nReg == REG_LED2_DRV))) {
               return ADPDDrv_ERROR;
         nMask = LED_CURRENT_MASK;
         nBitPos = LED_CURRENT_BITPOS;



    After fixing the function, it's working fine. 

    Thank you.