I have configured the sensor with following selection-:
- FAULT_COUNT - two fault
- MASK_EXPONENT - No exponent mask
- LATCH_FIELD - latched window-style comparison operation
- CONVERSION_MODE - Continuous
- CONVERSION_TIME 100 ms
- LUX_RANGE manually selected to EXPONENT_LEVEL_4 (lsb value 0.16).
I am testing the sensor by keeping different High Limit and Low Limit value. And reading the High Flag and Low Flag.
The problem I am facing is that every time High Flag is set doesn't matter what result register value is.
Example 1-
I set Hight limit to 20 lux and low limit to 5 lux.
Reading result register when conversion completed flag is high, it is 17 lux.
Reading High Flag and Low Flag, high flag is set. (In my understanding it should not be)
Example 2-
I set Hight limit to 15 lux and low limit to 5 lux.
Reading result register when conversion completed flag is high, it is 17 lux.
Reading High Flag and Low Flag, high flag is set. (This is okay for me)
Example 3-
I set Hight limit to 40 lux and low limit to 20 lux.
Reading result register when conversion completed flag is high, it is 17 lux.
Reading High Flag and Low Flag, high flag is set. (In my understanding Low Flag should have been set)
Please Let me know if my understanding is not correct.
Regards,
Srishti Verma,