| データシートサーチシステム |
|
TSL2580CS データシート(PDF) 32 Page - OSRAM GmbH |
|
|
|||||||||||||||||||||||||||||
TSL2580CS データシート(HTML) 32 Page - OSRAM GmbH |
|
32 / 53 page ![]() ams Datasheet Page 31 [v1-00] 2016-Apr-05 Document Feedback TSL2580, TSL2581 − Application Information: Software The following pseudo code illustrates a procedure for reading the TSL258x device (ALS) using word transactions: Command = 0x80 //Set Command bit and Control Reg Power_On = 0x01 //Power on device WriteByte (Address, Command, Power_On) Command = 0x81 //Set Command bit and ALS Timing Reg ITIME = 0xb6 //200 ms integration cycle //Configure ALS Timing Register for 200 ms integration cycle WriteByte (Address, Command, ITIME) Command = 0x80 //Set Command bit and Control Reg ADC_En = 0x03 //Enable ADC Channels //Keep device powered on and enable ADC prior to reading channel data WriteByte (Address, Command, ADC_En | Power_On) // Read ADC Channels Using Read Word Protocol - RECOMMENDED //Address the Ch0 lower data register and configure for Read Word Command = 0Xb4 //Set Command bit and Word bit //Reads two bytes from sequential registers 0x14 and 0x15 //Results are returned in DataLow and DataHigh variables ReadWord (Address, Command, DataLow, DataHigh) Channel0 = 256 * DataHigh + DataLow //Address the Ch1 lower data register and configure for Read Word Command = 0xb6 //Set Command bit and Word bit //Reads two bytes from sequential registers 0x16 and 0x17 //Results are returned in DataLow and DataHigh variables ReadWord (Address, Command, DataLow, DataHigh) Channel1 = 256 * DataHigh + DataLow //Shift DataHigh to upper byte |
|
リンク URL |
| 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 |