DatasheetQ Logo
Electronic component search and free download site. Transistors,MosFET ,Diode,Integrated circuits

TSL2580 Ver la hoja de datos (PDF) - TEXAS ADVANCED OPTOELECTRONIC SOLUTIONS

Número de pieza
componentes Descripción
Fabricante
TSL2580
TAOS
TEXAS ADVANCED OPTOELECTRONIC SOLUTIONS TAOS
TSL2580 Datasheet PDF : 34 Pages
First Prev 21 22 23 24 25 26 27 28 29 30 Next Last
TSL2580, TSL2581
LIGHT-TO-DIGITAL CONVERTER
unsigned long ratio1 = 0;
if (channel0 != 0) ratio1 = (channel1 << (RATIO_SCALE+1)) / channel0;
// round the ratio value
unsigned long ratio = (ratio1 + 1) >> 1;
TAOS098 − MARCH 2010
// is ratio <= eachBreak?
unsigned int b, m;
switch (iType)
{
case 1: // CS package
if ((ratio >= 0) && (ratio <= K1C))
{b=B1C; m=M1C;}
else if (ratio <= K2C)
{b=B2C; m=M2C;}
else if (ratio <= K3C)
{b=B3C; m=M3C;}
else if (ratio <= K4C)
{b=B4C; m=M4C;}
else if (ratio > K5C)
{b=B5C; m=M5C;}
break;
}
unsigned long temp;
unsigned long lux;
temp = ((channel0 * b) − (channel1 * m));
// round lsb (2^(LUX_SCALE−1))
temp += (1 << (LUX_SCALE−1));
// strip off fractional portion
lux = temp >> LUX_SCALE;
return(lux);
}
The LUMENOLOGY r Company
r
r
www.taosinc.com
Copyright E 2010, TAOS Inc.
25

Share Link: 

datasheetq.com  [ Privacy Policy ]Request Datasheet ] [ Contact Us ]