The OPT4041 device
features COUNTER registers as part of the output registers for both channels
which increment for every successful measurement. These registers 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. This is particularly
helpful in situations such as the following:
- Host or Controller needs consecutive
measurements. Utilizing the COUNTER registers, the controller can compare samples and verifies
that the samples are in expected order without missing intermediate counter
values.
- As a safety feature when the light level is not
changing, the controller can verify that the measurements from OPT4041 are not stuck by comparing values of the
COUNTER registers 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.