2.4 ALS and Flicker Timing
For ALS measurements one of the most important parameters is the ALS integration time. On legacy
devices like the TCS3707 that was the product of the modulator clock period at e.g. 2.78 µs, the value
in the ASTEP register (+1) and the value in the ATIME register (+1) as shown in Equation 3.
Equation 3:
On TSL2521, it is almost the same but the modulator clock changed to 1.3889 µs and the register/bit
field names are different as Equation 4 shows.
Equation 4:
On TSL2521, the first term –the modulator clock multiplied by sample_time –is the base sampling
time both for flicker measurements and for ALS measurements. If Flicker measurement is activated for
a modulator within the active sequencer step, every value at the end of the sampling time is pushed to
the FIFO –as often as set in fd_nr_samples in registers FD_NR_SAMPLES0 and
FD_NR_SAMPLES1 - and increases at the same time the ALS result –as often as set in
als_nr_samples in registers ALS_NR_SAMPLES0 and ALS_NR_SAMPLES1.
Therefore, the Flicker sampling frequency is the reciprocal of the sampling time set with register
SAMPLE_TIME, as shown in Equation 5.
Equation 5:
The whole flicker measurement time is defined by the mentioned sampling time and the register
FD_NR_SAMPLES, see Equation 6.
Equation 6:
Note that there is only one new ALS result after the ALS integration time for each modulator 0 and
modulator 1 since all single sample values are summed up. In contrast, there are fd_nr_samples
flicker results per chosen modulator in the FIFO after the Flicker measurement time of one step. If that
number of flicker results is more than the FIFO can handle –256 values with 16-bit width are normally
possible –the FIFO needs to be read out during the flicker measurement time to prevent a FIFO
overflow. Figure 8 and Figure 9 show the relation between ALS and flicker measurement within the
same step 0 of the sequencer with the chosen settings.