| поискавой системы для электроныых деталей |
|
TSL2568CS датащи(PDF) 40 Page - OSRAM GmbH |
|
|
|||||||||||||||||||||||||||||
TSL2568CS датащи(HTML) 40 Page - OSRAM GmbH |
|
40 / 56 page ![]() ams Datasheet Page 39 [v1-00] 2016-Apr-12 Document Feedback TSL2568, TSL2569 − Application Information: Software #define M6C 0x0000 // 0.00000 * 2^LUX_SCALE // lux equation approximation without floating point calculations ////////////////////////////////////////////////////////////////////////////// // Routine: unsigned int CalculateLux (unsigned int ch0, unsigned int ch0, int iType) // // Description: Calculate the approximate illuminance (lux) given the raw // channel values of the TSL2568. The equation if implemented // as a piece−wise linear approximation. // // Arguments: unsigned int iGain − gain, where 0:1X, 1:16X // unsigned int tInt − integration time, where 0:13.7mS, 1:100mS, 2:402mS, // 3:Manual // unsigned int ch0 − raw channel value from channel 0 of TSL2568 // unsigned int ch1 − raw channel value from channel 1 of TSL2568 // unsigned int iType − package type (0:T, 1:CS) // // Return: unsigned int − the approximate illuminance (lux) // ////////////////////////////////////////////////////////////////////////////// unsigned int CalculateLux (unsigned int iGain, unsigned int tInt, unsigned int ch0, 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: // 13.7 msec chScale = CHSCALE_TINT0; break; case 1: // 101 msec chScale = CHSCALE_TINT1; break; default: // assume no scaling chScale = (1 << CH_SCALE); break; } // scale if gain is NOT 16X if (!iGain) chScale = chScale << 4; // scale 1X to 16X // scale the channel values channel0 = (ch0 * chScale) >> CH_SCALE; channel1 = (ch1 * chScale) >> CH_SCALE; //−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− // find the ratio of the channel values (Channel1/Channel0) |
|
ссылки URL |
| Вашему бизинису помогли Аллдатащит? [ DONATE ] |
Что такое Аллдатащит | реклама | контакт | Конфиденциальность | Ссылка на техническое описание | обмен ссыками | поиск по производителю 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 |