The OPT4060 has output registers which are always available to readout to get measurements, the measurements themselves are updated based on the device mode of operation listed as follows. The OPT4060 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 used to bring the device out of this mode.
- Continuous mode: In this mode OPT4060 measures all four channels in a round-robin fashion
continuously and updates their corresponding output registers. The conversion time
register CONVERSION_TIME determines the time between each channel conversion and a
hardware interrupt on pin INT is generated for every successful conversion on each
channel or all four channels depending on INT_CFG register value. 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.
- One shot mode of operation: There are
several ways in which the OPT4060 can be used in one shot
mode of operation with the common theme which is that the OPT4060 stays in standby mode and a conversion is triggered either by a register
write to the configuration register or a hardware interrupt on the INT pin. Every
trigger generates one measurement for four channels, effectively taking four times the
time set by the CONVERSION_TIME register
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 in initiated ignoring the previous
measurements. This is particularly useful in situation 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.
- Regular auto-range one shot
mode: Auto-range selection logic utilizes the information from the previous
measurements to decide on 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 in
determined by the one shot triggers.
Users can trigger one shot mode through the following:
- Hardware trigger: the INT
pin can be configured to be an input to trigger a measurement using the INT_DIR register. The INT pin is used as input, therefore 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 M register triggers a measurement. The register
value is reset after a successful measurement. INT pin can be configured to
indicate measurement completion to read out output registers using the INT_DIR register.
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 4 times the
device conversion time. The
device enters standby after each one shot trigger, therefore measurement interval on
the one shot trigger mechanism must 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.