欢迎访问ic37.com |
会员登录 免费注册
发布采购

TCS3414 参数 Datasheet PDF下载

TCS3414图片预览
型号: TCS3414
PDF下载: 下载PDF文件 查看货源
内容描述: 数字色彩传感器 [DIGITAL COLOR SENSORS]
分类和应用: 传感器
文件页数/大小: 40 页 / 348 K
品牌: TAOS [ TEXAS ADVANCED OPTOELECTRONIC SOLUTIONS ]
 浏览型号TCS3414的Datasheet PDF文件第27页浏览型号TCS3414的Datasheet PDF文件第28页浏览型号TCS3414的Datasheet PDF文件第29页浏览型号TCS3414的Datasheet PDF文件第30页浏览型号TCS3414的Datasheet PDF文件第32页浏览型号TCS3414的Datasheet PDF文件第33页浏览型号TCS3414的Datasheet PDF文件第34页浏览型号TCS3414的Datasheet PDF文件第35页  
TCS3404, TCS3414  
DIGITAL COLOR SENSORS  
TAOS137A − APRIL 2011  
APPLICATION INFORMATION: SOFTWARE  
The following example pseudo code illustrates the configuration of an SMB-Alert style interrupt when the light  
intensity changes 20% from the current value, and persists for 2.5 seconds:  
//Assume Interrupt Source as Channel 1  
//Read current light level  
Address = 0x39  
Command = 0xB0  
//Slave address − alternatively 0x29 or 0x49  
//Set Command bit and SMBus Word read  
ReadWord (Address, Command, DataLow, DataHigh)  
Channel1 = (256 * DataHigh) + DataLow  
//Calculate upper and lower thresholds  
T_Upper = Channel1 + (0.2 * Channel1)  
T_Lower = Channel1 − (0.2 * Channel1)  
//Write the lower threshold register  
Command = 0xA8  
//Address lower threshold register, set Word Bit  
WriteWord (Address, Command, T_Lower.LoByte, T_Lower.HiByte)  
//Write the upper threshold register  
Command = 0xAA  
//Address upper threshold register, set Word bit  
WriteWord (Address, Command, T_Upper.LoByte, T_Upper.HiByte)  
//Enable interrupt  
Command = 0x82  
//Address interrupt register  
Data = 0x24  
//SMBAlert style, Persist 2.5 seconds  
WriteByte(Address, Command, Data)  
In order to generate an interrupt on demand during system test or debug, a test mode (INTR = 11) can be used.  
The following example illustrates how to generate an interrupt on demand:  
// Generate an interrupt  
Address = 0x39  
Command = 0x82  
Data = 0x30  
//Slave address alternately 0x29 or 0x49  
//Address Interrupt Control Register  
//Test interrupt  
WriteByte(Address, Command, Data)  
//Interrupt line should now be low  
Copyright E 2011, TAOS Inc.  
The LUMENOLOGY r Company  
r
r
www.taosinc.com  
31  
 复制成功!