データシートサーチシステム
  Japanese  ▼
ALLDATASHEET.JP

X  

TSL2580CS データシート(PDF) 37 Page - OSRAM GmbH

部品番号 TSL2580CS
部品情報  Light-to-Digital Converter
PDF  53 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
メーカー  OSRAM [OSRAM GmbH]
ホームページ  http://www.osram.com
Logo OSRAM - OSRAM GmbH

TSL2580CS データシート(HTML) 37 Page - OSRAM GmbH

Back Button TSL2580CS Datasheet HTML 33Page - OSRAM GmbH TSL2580CS Datasheet HTML 34Page - OSRAM GmbH TSL2580CS Datasheet HTML 35Page - OSRAM GmbH TSL2580CS Datasheet HTML 36Page - OSRAM GmbH TSL2580CS Datasheet HTML 37Page - OSRAM GmbH TSL2580CS Datasheet HTML 38Page - OSRAM GmbH TSL2580CS Datasheet HTML 39Page - OSRAM GmbH TSL2580CS Datasheet HTML 40Page - OSRAM GmbH TSL2580CS Datasheet HTML 41Page - OSRAM GmbH Next Button
Zoom Inzoom in Zoom Outzoom out
 37 / 53 page
background image
Page 36
ams Datasheet
Document Feedback
[v1-00] 2016-Apr-05
TSL2580, TSL2581 − Application Information: Software
// 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 TSL2581. The equation if implemented
// as a piece-wise linear approximation.
//
// Arguments: unsigned int iGain - gain, where 0:1X, 1:8X, 2:16X, 3:128X
// unsigned int tIntCycles - INTEG_CYCLES defined in Timing Register
// unsigned int ch0 - raw channel value from channel 0 of TSL2581
// unsigned int ch1 - raw channel value from channel 1 of TSL2581
// unsigned int iType - package type (1:CS)
//
// Return: unsigned int - the approximate illuminance (lux)
//
//////////////////////////////////////////////////////////////////////////////
unsigned int CalculateLux(unsigned int iGain, unsigned int tIntCycles, unsigned int ch0,
unsigned int ch1, int iType)
{
//------------------------------------------------------------------------
// first, scale the channel values depending on the gain and integration time
// 1X, 400ms is nominal setting
unsigned long chScale0;
unsigned long chScale1;
unsigned long channel1;
unsigned long channel0;
// No scaling if nominal integration (148 cycles or 400 ms) is used
if (tIntCycles == NOM_INTEG_CYCLE)
chScale0 = (1 << CH_SCALE);
else
chScale0 = (NOM_INTEG_CYCLE << CH_SCALE) / tIntCycles;
switch (iGain)
{
case 0: // 1x gain
chScale1 = chScale0;
// No scale. Nominal setting
break;
case 1: // 8x gain
chScale0 = chScale0 >> 3;
// Scale/multiply value by 1/8
chScale1 = chScale0;
break;
case 2: // 16x gain
chScale0 = chScale0 >> 4;
// Scale/multiply value by 1/16
chScale1 = chScale0;
break;
case 3: // 128x gain
chScale1 = chScale0 / CH1GAIN128X;
//Ch1 gain correction factor applied



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53


データシート ダウンロード

Go To PDF Page


リンク URL



ALLDATASHEETはお客様のビジネスに役立ちますか?  [ DONATE ] 

Alldatasheetは   |   広告   |   お問い合わせ   |   プライバシーポリシー   |   データシートへのリンク    |   リンク交換   |   メーカーリスト
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
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