This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

im36011 can't set register 0x01 bit 0 and bit 1

Other Parts Discussed in Thread: LM36011

In IM36011 datasheet, there are there modes(flash mode / torch mode / IR mode) than im36011 can work on.

Activated by the enable register (0x01), setting mode M1, M0(bits(1:0)) to corresponding vale.

As a matter of fact, im36011 can't set register 0x01(bits(1:0)).

How to change the working mode?

  • Hi Carl,

        You can change the mode with Reg0x01 bit[1:0}. For your situation, please check the solder/connection/power supply and I2C communication. 

        I think you can check the I2C is good or not, you can read reg0x06. Do you get something when reading reg0x06 and reg0x05? If not, I2C is the problem.

    BR

    Sean

  • Hi Sean,

    Yes. I can read reg0x06 and 0x05. I2C is OK.

    When i sent 0xFF to Reg0x01, then read Reg0x01, the result of Reg0x01 is 0xFC. Only the last two bit can't change, witch is used to change work mode.

    note: It is LM36011, not im36011.

    BR

    Carl.

  • Hi Carl,

        What's the read back value of reg 0x05?

    BR

    Sean

  • Hi Sean.

     reg 0x05 read back value is 0x0.

    0x01=0x20

    0x02=0x15

    0x03=0x80

    0x04=0x00

    0x05=0x00

    0x06=0x01

    BR

    Carl

  • Hi Sean.

                   default                     set                             get

    0x01       0x20                       0xff                            0xFC

    0x02       0x15                       0xff                            0xFF

    0x03       0x80                       0xff                            0xFF

    0x04       0x00                       0xff                            0x7F

    0x05       0x00                       0xff                            0x20

    0x06       0x01                       0xff                             0x01

    As you can see above, some bit can't be set.

    BR

    Carl

  • Hi Carl,

        Reg 0x05 is the fault regs which indicate the fault status of the devices. Please don't write any data to this reg and try again.

    BR

    Sean

  • Hi Sean.

      I sent reg0x01 to 0x22(defult is 0x20), then read reg0x05,  0x05 value change from 0x00  to 0x20.

    BR

    Sean

  • Hi Carl,

        Have you connected the LED when you do the test? This is really strange and you can try with another device.

    BR

    Sean

  • Hi Sean,

        Yes, we have connected the LED when we do the test。Other device with the same test result.

        Please help to check the hw design.

    BR

    Carl

  • Hi Carl,

        Please remove C5126 and C1003 from the schematic.

    BR

    Sean

  • Hi Sean,

    After remove C5126 and C1003, reg 0x01 can set to 0x02, reg0x05 read is 0x00(OK).

    But reg0x01 set to 0x02, reg0x04 set to 0x1F,  reg0x05 read is 0x00, It still can't work as Torch Mode.

    --------------------------------------------------------------------------

    In torch mode, the LED current source provides 128 target current levels from 2.4 mA to 376 mA, set by the LED Torch Brightness Register (0x04 bits [6:0]). Torch mode is activated by the Enable Register (0x01), setting mode M1, M0 (bits [1:0]) to 10. Once the TORCH sequence is activated, the LED current source ramps up to the programmed torch current by stepping through all current steps until the programmed current is reached. The rate at which the current ramps is determined by the value chosen in the Torch Ramp bit [0] in Timing Register (0x02)

    --------------------------------------------------------------------------

    BR

    Carl

  • Hi Carl,

         The regs setting is ok, you'd better try again and test, it is really strange with your description, it should work with those regs setting.

    BR

    Sean

  • Hi Sean.

    Thank you very much!   After remove C5126, reg0x01 can set OK.

    "It still can't work as Torch Mode", because we can't see the light by eyes, not working abnormal.

    BR 

    Carl.