OPT4048
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 below. The OPT4048 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.
Continuous mode: In
this mode OPT4048 measures all 4 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 4 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 OPT4048 can be used in one shot mode of operation with one common
theme which is that OPT4048 stays in standby
mode and a conversion is triggered by a register write either by a register
write to configuration register or hardware interrupt on the INT pin. Every
trigger generates one measurement for 4 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.
One Shot can
be triggered using by the following:
Hardware
trigger: INT pin can be configured to be an input to
trigger a measurement using INT_DIR register. 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 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.
Since the device enters
standby after each one shot trigger, measurement interval on 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-1 Timing Diagrams for different
Operating modes