TSL2562 TAOS [TEXAS ADVANCED OPTOELECTRONIC SOLUTIONS], TSL2562 Datasheet - Page 26

no-image

TSL2562

Manufacturer Part Number
TSL2562
Description
LOW-VOLTAGE LIGHT-TO-DIGITAL CONVERTER
Manufacturer
TAOS [TEXAS ADVANCED OPTOELECTRONIC SOLUTIONS]
Datasheet
TSL2562, TSL2563
LOW-VOLTAGE
LIGHT-TO-DIGITAL CONVERTER
TAOS066N − AUGUST 2010
#define K4C
#define B4C
#define M4C
#define K5C
#define B5C
#define M5C
#define K6C
#define B6C
#define M6C
#define K7C
#define B7C
#define M7C
#define K8C
#define B8C
#define M8C
// lux equation approximation without floating point calculations
//////////////////////////////////////////////////////////////////////////////
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//////////////////////////////////////////////////////////////////////////////
unsigned int CalculateLux(unsigned int iGain, unsigned int tInt, unsigned int ch0,
{
26
Copyright E 2010, TAOS Inc.
Routine:
Description: Calculate the approximate illuminance (lux) given the raw
Arguments:
Return:
unsigned int ch1, int iType)
//−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
// first, scale the channel values depending on the gain and integration time
// 16X, 402mS is nominal.
// scale if integration time is NOT 402 msec
unsigned long chScale;
unsigned long channel1;
unsigned long channel0;
switch (tInt)
{
case 0:
case 1:
default:
0x010a // 0.520 * 2^RATIO_SCALE
0x0282 // 0.0392 * 2^LUX_SCALE
0x03df // 0.0605 * 2^LUX_SCALE
0x014d // 0.65 * 2^RATIO_SCALE
0x0177 // 0.0229 * 2^LUX_SCALE
0x01dd // 0.0291 * 2^LUX_SCALE
0x019a // 0.80 * 2^RATIO_SCALE
0x0101 // 0.0157 * 2^LUX_SCALE
0x0127 // 0.0180 * 2^LUX_SCALE
0x029a // 1.3 * 2^RATIO_SCALE
0x0037 // 0.00338 * 2^LUX_SCALE
0x002b // 0.00260 * 2^LUX_SCALE
0x029a // 1.3 * 2^RATIO_SCALE
0x0000 // 0.000 * 2^LUX_SCALE
0x0000 // 0.000 * 2^LUX_SCALE
chScale = CHSCALE_TINT0;
break;
chScale = CHSCALE_TINT1;
break;
chScale = (1 << CH_SCALE);
unsigned int CalculateLux(unsigned int ch0, unsigned int ch0, int iType)
channel values of the TSL2562. The equation if implemented
as a piece−wise linear approximation.
unsigned int iGain − gain, where 0:1X, 1:16X
unsigned int tInt − integration time, where 0:13.7mS, 1:100mS, 2:402mS,
unsigned int ch0 − raw channel value from channel 0 of TSL2562
unsigned int ch1 − raw channel value from channel 1 of TSL2562
unsigned int iType − package type (T or CS)
unsigned int − the approximate illuminance (lux)
3:Manual
// 13.7 msec
// 101 msec
// assume no scaling
r
www.taosinc.com
r
The LUMENOLOGY r Company

Related parts for TSL2562