The OPT4003-Q1 has the following modes of operation:
- Power-down mode: This mode is a power-down or standby mode where the device enters a low-power state. There is no active light sensing or conversion in this mode. The device still responds to I2C transactions that can be used to bring the device out of this mode. The OPERATING_MODE register is set to 0.
- Continuous mode: In this mode, the OPT4003-Q1 measures and updates the output
registers continuously as determined by the conversion time and generates a
hardware interrupt on the INT pin for every successful conversion.
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. The OPERATING_MODE register is set to
3.
- One-shot mode: There are two ways in which
the OPT4003-Q1 can be used in one-shot mode of
operation with one common theme where the OPT4003-Q1 stays in standby mode and a conversion is triggered either
by a register write to the configuration register or by a hardware interrupt
on the INT pin .
There are two types of
one-shot modes. Both of these modes operate with auto-range selection
logic unless a manual range mode is specified by setting the RANGE bits
in the configuration register.
- Force
auto-range one-shot mode: Every one-shot trigger forces
a full reset on the auto-ranging control logic and a fresh
auto-range detection is initiated, ignoring the previous
measurements. This mode is particularly useful in situations
where lighting conditions are expected to change frequently and
the conditions for the one-shot trigger frequency are not
expected to change very often. There is a small penalty on
conversion time resulting from the auto-ranging logic recovering
from a reset state. The full reset cycle on the auto-ranging
control logic takes approximately 500 μs, which must be
accounted for between measurements when this mode is used. The
OPERATING_MODE register
is set to 1.
- Regular
auto-range one-shot mode: Auto-range selection logic
uses the information from the previous measurements to determine
the range for the current trigger. Only use this mode 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
between these modes is that the interval between measurements is
determined by the one-shot triggers. The OPERATING_MODE register
is set to 2.
One-shot mode
can be triggered by the following:
- Hardware
trigger : The
INT pin can be configured as an input to trigger a measurement,
setting the INT_DIR register to 0.
When the INT pin is used as input, there is no hardware
interrupt to indicate completion of measurement. The controller
must 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 the next successful measurement. The INT pin can be
configured to indicate measurement completion to read out the
output registers by setting the INT_DIR register to
1.
The interval
between subsequent triggers must be set to account for all aspects
involved in the trigger mechanism, such as 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 the current measurement, the device simply ignores the new
request until the previous conversion is completed.
The device enters standby
after each one-shot trigger; therefore, the measurement interval in the
one-shot trigger mechanism must account for additional time
(tss time, as specified in the Specifications
section 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 the device not entering standby mode between
triggers.
Figure 6-2 illustrates a timing diagram of the various operating modes.