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.

OPT3001: OPT3001 - Reading from OPT3001 sensor result register

Part Number: OPT3001
Other Parts Discussed in Thread: MSP430FR5869

Hi,

     I am trying to get ALS value for MSP430fr5869 from OPT3001 through I2C.

     I have set up the I2C communication and have successfully read Device ID from Device ID register in OPT3001.

     The problem now is when I try to read ALS result from the result register it returns 0.

     I have set the configuration register as 0xcc10 which means automatic full-scale setting, 800ms conversion time, continous-conversions and latched window-style       comparison.

     Does this means ALS is not initialize properly? Thank you.

Yifan

  • Hi Yifan,

    You config register setting looks good so the device should be reporting data. Is the OPT3001 exposed to light? It will read 0 if there is no light. Also what exactly are you getting when you read the result register (all 2 bytes)?

    Best,

    Alex
  • Hi Alex,

         Thank you for reply. I put the device under normal office environment (about 50 lux lighting).

         I am reading the 2 bytes from result register which should be the value of ALS conversion and they are both returning 0.

         Another test that I have done is setting Mode of Operation to be one-shot. From datasheet Mode of Operation should be automatically set to off after one conversion is done in one shot mode. However when I read from the configuration register after period of time the Mode of Operation remains as one-shot. I am not sure if this confirms that there is issue with my OPT3001 module. 

         Thank you.

    Yifan  

  • Update: The issue has been resolved. The problem is that the system gets ALS result at the beginning when system bootup and the value is not updated everytime I tried to read the value. Therefore the output value is always the value at the start of system which is 0. But thanks again for the help

    Yifan