The OPT4001 device has the following modes of operation:
Power-down mode: This
is power-down or standby mode where the device enters a low power state.
There is no active light sensing or conversion in this mode. Device still
responds to I2C transactions which can be utilized to bring the
device out of this mode. Register OPERATING_MODE is set to 0.
Continuous mode: In
this mode OPT4001 measures and updates the
output registers continuously determined by the conversion time and
generates hardware interrupt on pin INT (Only on SOT-5X3 package variant)
for every successful conversion. TI recommends to configure the INT pin in
output mode using the INT_DIR register. The device active circuits are
continuously kept active to minimize the interval between measurements.
Register OPERATING_MODE is set to 3.
One shot mode of
operation: There are several ways in which OPT4001 can be used in one shot mode of operation with one common
theme where OPT4001 stays in standby mode and a
conversion is triggered either by a register write to configuration register
or hardware interrupt on the INT pin.
There are two types of
one shot modes.
Force
auto-range one shot mode: Every one shot trigger forces
a full reset on auto-ranging control logic and a fresh
auto-range detection is initiated ignoring the previous
measurements. This is particularly useful in situations where
lighting conditions are expected to change a lot and one shot
trigger frequency is not very often. There is small penalty on
conversion time due for the auto-ranging logic to recover from
reset state. The full reset cycle on the auto-ranging control
logic takes around 500 μs which needs to be accounted for
between measurements when this mode is used. Register
OPERATING_MODE is set to 1.
Regular
auto-range one shot mode: Auto-range selection logic
utilizes the information from the previous measurements to
decide the range for the current trigger. This mode is
recommended only when the device needs time synchronized
measurements with frequent triggers from the controller. In
other words, this mode can be used as an alternative to
continuous mode the key difference being that the interval
between measurements is determined by the one shot triggers.
Register OPERATING_MODE is set to 2.
One Shot can
be triggered by the following
Hardware
trigger (Only on SOT-5X3 variant):INT pin can be
configured to be an input to trigger a measurement setting
INT_DIR register to 0. Since INT pin is used as input, there is
no hardware interrupt to indicate completion of measurement. The
controller needs to keep time from the trigger mechanism and
read out output registers.
Register
trigger: An I2C write to the OPERATING_MODE
register triggers a measurement (value of 1 or 2). The register
value is reset after next successful measurement. INT pin can be
configured to indicate measurement completion to read out output
registers setting the INT_DIR register to 1.
TI highly recommends to set the interval between subsequent
triggers to account for all the aspects involved in the trigger
mechanism like the I2C transaction time, device wake-up time,
auto-range time (if used) and device conversion time. If a conversion
trigger is received before the completion of current measurement, the
device simply ignores the new request until the previous conversion is
completed.
Since
the device enters standby after each one shot trigger, measurement
interval in the one shot trigger mechanism needs to account for
additional time Tss as specified in the specification table
for the circuits to recover from standby state. However setting the
quick wake up register QWAKE eliminates the need for this additional
Tss at the cost of not powering down the active circuit
with device not entering the standby mode between triggers.
Figure 8-3 Timing Diagrams for different
Operating modes