| 数据搜索系统,热门电子元器件搜索 |
|
TSL2580CS 数据表(PDF) 38 Page - OSRAM GmbH |
|
|
|||||||||||||||||||||||||||||
TSL2580CS 数据表(HTML) 38 Page - OSRAM GmbH |
|
38 / 53 page ![]() ams Datasheet Page 37 [v1-00] 2016-Apr-05 Document Feedback TSL2580, TSL2581 − Application Information: Software chScale0 = chScale0 / CH0GAIN128X; //Ch0 gain correction factor applied break; } // scale the channel values channel0 = (ch0 * chScale0) >> CH_SCALE; channel1 = (ch1 * chScale1) >> CH_SCALE; //------------------------------------------------------------------------ // find the ratio of the channel values (Channel1/Channel0) // protect against divide by zero unsigned long ratio1 = 0; if (channel0 != 0) ratio1 = (channel1 << (RATIO_SCALE+1)) / channel0; // round the ratio value unsigned long ratio = (ratio1 + 1) >> 1; // 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); } |
|
链接网址 |
| ALLDATASHEET是否为您带来帮助? [ DONATE ] |
关于 Alldatasheet | 广告服务 | 联系我们 | 隐私政策 | 数据表链接 | 链接交换 | 制造商名单 All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |