The OPT4048 device features registers COUNTER_CHx as part of the output registers which
increments for every successful measurement. This register can be read as part of
the output registers which helps the application to 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. There are independent counters for each
channel counting up every successful conversion.
- Host or the controller needs
consecutive measurements. Utilizing the COUNTER_CHx registers allow the controller to compare
samples and makes sure that the samples are in expected order without missing
intermediate counter values.
- As a safety feature where when
light level are not changing, the controller can make sure that the measurements
from OPT4048 are not stuck by comparing values of
registers COUNTER_CHx between measurements. If the COUNTER_CHx values continue to change over samples, the
device is updating the output register with the most recent measurement of light
levels.