The OPT4003-Q1 features
a COUNTER register as part of the output
registers that increment for every successful measurement. This register can be read
as part of the output registers, which helps the application keep track of
measurements. The 4-bit counter starts at 0 on power-up and counts up to 15 after
which the counter resets back to 0 and continues to count up, which is particularly
helpful in situations such as the following:
- The host or the controller requires consecutive
measurements. Using the COUNTER register allows the controller
to compare samples and makes sure that the samples are in the expected order
without missing intermediate counter values.
- As a safety feature when light levels are not
changing, the controller can make sure that the measurements from the OPT4003-Q1 are not stuck by comparing the values of
the COUNTER register between measurements.
If the COUNTER values continue to change over
samples, the device updates the output register with the most recent measurement
of light levels.