TSL2521 ALS/Flicker
TSL2521 ALS and Flicker Settings
Application Note
• PUBLIC
AN001042
• v1-01 • 2022-Jan-27
23
│ 6
Since the Residual measurement is done with a resolution of max. 4 bits on this device that results in
4 extra resolution bits almost for free. That way it is possible to use lower gains that have a better
linearity than higher gains, because the Residual bits provide additional resolution on LSB side.
Nevertheless, that has a limit too, so the Residual measurement resolution is reduced at higher gains
– that is why residual measurement is mainly suited to increase the resolution at medium and lower
gains.
There are two different gain tables, the default one reduces the evaluated number of residual bits
starting at gain 128x upwards by 1 for each gain step. The second gain table is valid up to gain 256x
and always uses 4 bits for residuals. It is recommended to use the second gain table and restrict the
maximum gain to 256x. Adding the 4 bits Residual resolution results in an effective gain of 4096x in
this case
– but at the gain non-linearity of 256x, which is rather low.
In order to use the second gain table mod_gain_select has to be set to 3 before starting the
measurement, this field can be found in register
MOD_GAIN_H
as shown in Figure 2. The field
measurement_sequencer_max_mod_gain has to be set to 9 in register
CFG8
to restrict the modulator
gain to 256x.
Figure 2:
MOD_GAIN_H
Addr: 0xED
MOD_GAIN_H
Bit
Bit Name
Default
Access
Bit Description
7:6
Reserved
0
5:4
MOD_GAIN_SELECT
0
RW
One bit for each channel to
select second gain table.
This register has to be
written before enabling the
sequencer!
3:0
Reserved
0
Figure 3 shows the Number of Residual bits for the gain steps of the two gain tables. If less than 4
Residual bits are used the non-used bits starting from LSB side are set to 0. This leads to higher
minimum step sizes of the ALS or Flicker sample results as well.
Figure 3:
Number of Residual Bits Depending on Gain Table Chosen by mod_gain_select
Mod_gainx [gain]
Number of Residual Bits for
mod_gain_select = 0
Number of Residual Bits for
mod_gain_select = 1
0 [0.5x]
– 8 [128x]
4
4
9 [256x]
3
4
10 [512x]
2
Reserved
11 [1024x]
1
Reserved