Si 11 4 1 / 4 2 /43 带 I2C 接口的临近 / 环境光传感器 IC 功能 集成红外线临近探测器 临近探测可从 1 cm 以下调节到超过 200 cm 三个独立的 LED 驱动器 每个 LED 驱动器有 15 个电流 设置,从 5.6 mA 到 360 mA 25.6 µs LED 驱动器脉冲宽度 50 cm 临近范围,具有单个脉冲 (<3 klx) 15 cm 临近范围,具有单个脉冲 (>3 klx) 运行时高达 128 klx (阳光直射) 2 高反射灵敏度 < 1 µW/cm 高电磁抗扰性,无屏蔽封装 集成环境光传感器 分辨率可以达到 100 mlx, 允许在深色玻璃下工作 在两个 ADC 范围设置之间动态 范围可以达到 1 至 128 klx Pin Assignments 使用红外校正算法可以准确测量照 明度 业界最低的功耗 1.71 至 3.6 V 电源电压 9 µA 平均电流 (180 mA 和 3 µA Si114x 电源时每 800 ms LED 脉冲 25.6 µs) < 500 nA 待机电流 25.6µs LED “ 开启 ” 时间使总功 耗占空比较低,不会影响性能和抗 扰度 支持内部和外部唤醒 内置电压电源监控器和接通电源复 位控制器 串行通信 数据速率高达 3.4 Mbps 从模式硬件地址解码 (0x5A) 小外形 10 引线 2x2 mm QFN 温度范围 –40 至 +85 °C DNC SDA 1 SCL 2 VDD 3 INT 4 10 QFN-10 5 9 LED1 8 GND 7 LED3/CVDD 6 LED2/CVDD DNC 应用 手机 心率监控 脉搏血氧计 可穿戴 音频产品 安全面板 窜改探测电路 分配器 阀门控制 烟雾探测器 非接触开关 非接触滑动器 占位传感器 消费类电子设备 工业自动化 显示屏背光控制 光中断器 说明 Si1141/42/43 是基于反射的低功率红外线临近和环境光传感器,带有 I2C 数字接口和 可编程事件中断输出。此非接触传感器 IC 包括模拟到数字转换器、集成高灵敏度可见 和红外线光电二极管 、数字信号处理器和具有十五个可选驱动电平的一个、两个或三 个集成红外线 LED 驱动器。 Si1141/42/43 在广泛的动态范围和包括阳光直射在内的 各种光源下可提供优异性能。 Si1141/42/43 还可以在深色玻璃盖下工作。光电二极管 响应和关联的数字转换电路对人造光闪烁噪声和自然光颤动噪声具有优异的抗扰性。 Si1142/43 具有两个或多个 LED,能够支持多轴式临近运动探测。 Si1141/42/43 器件 在 10 引线 2x2 mm QFN 封装中提供,能够在 –40 至 +85 °C 温度范围中在 1.71 至 3.6 V 的条件下运行。 Rev. 1.41 5/15 版权 © 2015 Silicon Laboratories Si1141/42/43 Si1141/42/43 功能框图 VDD Regulator Temp Visible A M U X LED2 1 LED3 2 Filter ADC Digital Sequencer & Control Logic Infrared INT LED1 LED Drivers SCL Registers I2C SDA Oscillator GND 1. Si1142 and Si1143 only. Must be tied to V DD with Si1141. 2. Si1143 only. Must be tied to V DD with Si1141 and Si1142. 3.3 V 30 ohm 5%, 1/16 W Host Si1141 SDA SDA LED1 SCL SCL GND INT VDD CVDD INT CVDD 15 µF, 20%, >6 V 0.1 uF Figure 1. Si1141 Basic Application 3.3 V 4.3 V No Pop Host 30 ohm 5%, 1/16 W Si1143 SDA LED1 SCL GND VDD LED3 INT LED2 22 uF, 20%, >6V 0.1 uF Figure 2. Si1143 Application with Three LEDs and Separate LED Power Supply 注: 有关更多的应用示例,请参阅 “AN498:Si114x 设计者指南 ”。 2 Rev. 1.41 Si1141/42/43 目录 章节 页码 电气规格 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 性能表 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4 典型性能图 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 功能描述 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 简介 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 临近感应 (PS) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 环境光 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13 主机接口 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 运行模式 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 关闭模式 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 初始化模式 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 备用模式 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 强制转换模式 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 自发运行模式 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 编程指南 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 命令和响应结构 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 命令协议 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 资源汇总 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 信号通路软件模型 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 I2C 寄存器 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 参数 RAM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 引脚说明 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 订购指南 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 包装外形:10 引脚 QFN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 建议的 PCB 焊盘图案 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .71 文档更改列表 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 联系信息 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 Rev. 1.41 3 Si1141/42/43 1. 电气规格 1.1. 性能表 Table 1. Recommended Operating Conditions Parameter Symbol VDD Supply Voltage Condition VDD VDD OFF Supply Voltage VDD_OFF Min Typ Max Unit 1.71 — 3.6 V 1.0 V OFF mode –0.3 VDD = 3.3 V 1 kHz–10 MHz — — 50 mVpp T –40 25 85 °C SCL, SDA, Input High Logic Voltage I2CVIH VDDx0.7 — VDD V SCL, SDA Input Low Logic Voltage I2CVIL 0 — VDDx0.3 V Edc — — 128 klx l 750 850 950 nm IrLED VF = 1.0 V nominal VDD — 4.3 V Applies if IrLEDs use separate supply rail 0–30 kHz 30 kHz–100 MHz — — — — 250 100 mVpp mVpp Start-Up Time VDD above 1.71 V 25 — — ms LED3 Voltage Start-up VDDx0.77 — — V VDD Supply Ripple Voltage Operating Temperature PS Operation under Direct Sunlight IrLED Emission Wavelength IrLED Supply Voltage VLED IrLED Supply Ripple Voltage Table 2. Performance Characteristics1 Parameter Symbol Condition Min Typ Max Unit IDD OFF Mode Ioff VDD < VDD_OFF (leakage from SCL, SDA, and INT not included) — 240 1000 nA IDD Standby Mode Isb No ALS / PS Conversions No I2C Activity VDD = 1.8 V — 150 500 nA Notes: 1. Unless specifically stated in "Conditions", electrical data assumes ambient light levels < 1 klx. 2. Proximity-detection performance may be degraded, especially when there is high optical crosstalk, if the LED supply and voltage drop allow the driver to saturate and current regulation is lost. 3. Guaranteed by design and characterization. 4. Represents the time during which the device is drawing a current equal to Iactive for power estimation purposes. Assumes default settings. 4 Rev. 1.41 Si1141/42/43 Table 2. Performance Characteristics1 (Continued) Parameter Symbol Condition Min Typ Max Unit Isb No ALS / PS Conversions No I2C Activity VDD =3.3 V — 1.4 — µA Iactive Without LED influence, VDD = 3.3 V — 4.3 5.5 mA Peak IDD while LED1, LED2, or LED3 is Actively Driven VDD = 3.3 V — 8 — mA LED Driver Saturation Voltage2,3 Vdd = 1.71 to 3.6 V PS_LEDn = 0001 PS_LEDn = 0010 PS_LEDn = 0011 PS_LEDn = 0100 PS_LEDn = 0101 PS_LEDn = 0110 PS_LEDn = 0111 PS_LEDn = 1000 PS_LEDn = 1010 PS_LEDn = 1010 PS_LEDn = 1011 PS_LEDn = 1100 PS_LEDn = 1101 PS_LEDn = 1110 PS_LEDn = 1111 — — — — — — — — — — — — — — — 50 60 70 80 115 150 185 220 255 290 315 340 360 385 410 70 105 105 105 450 450 450 450 450 450 600 600 600 600 600 — 25.6 30 µs –1 — 1 µA IDD Standby Mode IDD Actively Measuring LED1, LED2, LED3 Pulse Width LED1, LED2, LED3, INT, SCL, SDA Leakage Current tPS VDD = 3.3 V mV Notes: 1. Unless specifically stated in "Conditions", electrical data assumes ambient light levels < 1 klx. 2. Proximity-detection performance may be degraded, especially when there is high optical crosstalk, if the LED supply and voltage drop allow the driver to saturate and current regulation is lost. 3. Guaranteed by design and characterization. 4. Represents the time during which the device is drawing a current equal to Iactive for power estimation purposes. Assumes default settings. Rev. 1.41 5 Si1141/42/43 Table 2. Performance Characteristics1 (Continued) Parameter Symbol Condition Min Typ Max ILEDx VDD = 3.3 V, single drive VLEDn = 1 V, PS_LEDn = 0001 VLEDn = 1 V, PS_LEDn = 0010 VLEDn = 1 V, PS_LEDn = 0011 VLEDn = 1 V, PS_LEDn = 0100 VLEDn = 1 V, PS_LEDn = 0101 VLEDn = 1 V, PS_LEDn = 0110 VLEDn = 1 V, PS_LEDn = 0111 VLEDn = 1 V, PS_LEDn = 1000 VLEDn = 1 V, PS_LEDn = 1001 VLEDn = 1 V, PS_LEDn = 1010 VLEDn = 1 V, PS_LEDn = 1011 VLEDn = 1 V, PS_LEDn = 1100 VLEDn = 1 V, PS_LEDn = 1101 VLEDn = 1 V, PS_LEDn = 1110 VLEDn = 1 V, PS_LEDn = 1111 3.5 — 13 — — — — — — — — — — — — 5.6 11.2 22.4 45 67 90 112 135 157 180 202 224 269 314 359 7 — 29 — — — — — — — — — — — — Actively Measuring Time4 Single PS ALS VIS + ALS IR Two ALS plus three PS — — — 155 285 660 — — — µs µs µs Visible Photodiode Response Sunlight ALS_VIS_ADC_GAIN = 0 VIS_RANGE = 0 — 0.282 — ADC counts/lux 2500K incandescent bulb ALS_VIS_ADC_GAIN = 0 VIS_RANGE = 0 — 0.319 — ADC counts/lux “Cool white” fluorescent ALS_VIS_ADC_GAIN = 0 VIS_RANGE = 0 — 0.146 — ADC counts/lux Infrared LED (875 nm) ALS_VIS_ADC_GAIN = 0 VIS_RANGE = 0 — 8.277 — ADC counts.m2/ W LED1, LED2, LED3 Active Current Unit mA Notes: 1. Unless specifically stated in "Conditions", electrical data assumes ambient light levels < 1 klx. 2. Proximity-detection performance may be degraded, especially when there is high optical crosstalk, if the LED supply and voltage drop allow the driver to saturate and current regulation is lost. 3. Guaranteed by design and characterization. 4. Represents the time during which the device is drawing a current equal to Iactive for power estimation purposes. Assumes default settings. 6 Rev. 1.41 Si1141/42/43 Table 2. Performance Characteristics1 (Continued) Parameter Condition Min Typ Max Unit Sunlight ALS_IR_ADC_GAIN = 0 IR_RANGE = 0 — 2.44 — ADC counts/lux 2500K incandescent bulb ALS_IR_ADC_GAIN = 0 IR_RANGE = 0 — 8.46 — ADC counts/lux “Cool white” fluorescent ALS_IR_ADC_GAIN = 0 IR_RANGE = 0 — 0.71 — ADC counts/lux Infrared LED (875 nm) ALS_IR_ADC_GAIN = 0 IR_RANGE = 0 — 452.38 — ADC counts.m2/ W Sunlight PS_ADC_GAIN = 0 PS_RANGE = 0 PS_ADC_MODE = 0 — 14.07 — ADC counts/lux 2500K incandescent bulb PS_ADC_GAIN = 0 PS_RANGE = 0 PS_ADC_MODE = 0 — 50.47 — ADC counts/lux “Cool white” fluorescent PS_ADC_GAIN = 0 PS_RANGE = 0 PS_ADC_MODE = 0 — 3.97 — ADC counts/lux Infrared LED (875 nm) PS_ADC_GAIN = 0 PS_RANGE = 0 PS_ADC_MODE = 0 — 2734 — ADC counts.m2/ W Visible Photodiode Noise All gain settings — 7 — ADC counts RMS Small Infrared Photodiode Noise All gain settings — 1 — ADC counts RMS Small Infrared Photodiode Response Large Infrared Photodiode Response Symbol Notes: 1. Unless specifically stated in "Conditions", electrical data assumes ambient light levels < 1 klx. 2. Proximity-detection performance may be degraded, especially when there is high optical crosstalk, if the LED supply and voltage drop allow the driver to saturate and current regulation is lost. 3. Guaranteed by design and characterization. 4. Represents the time during which the device is drawing a current equal to Iactive for power estimation purposes. Assumes default settings. Rev. 1.41 7 Si1141/42/43 Table 2. Performance Characteristics1 (Continued) Parameter Condition Min Typ Max Unit Large Infrared Photodiode Noise All gain settings — 10 — ADC counts RMS Visible Photodiode Offset Drift VIS_RANGE = 0 ALS_VIS_ADC_GAIN = 0 ALS_VIS_ADC_GAIN = 1 ALS_VIS_ADC_GAIN = 2 ALS_VIS_ADC_GAIN = 3 ALS_VIS_ADC_GAIN = 4 ALS_VIS_ADC_GAIN = 5 ALS_VIS_ADC_GAIN = 6 ALS_VIS_ADC_GAIN = 7 — — ADC counts/°C Small Infrared Photodiode Offset Drift IR_RANGE = 0 IR_GAIN = 0 IR_GAIN = 1 IR_GAIN = 2 IR_GAIN = 3 — — ADC counts/°C I = 4 mA, VDD > 2.0 V I = 4 mA, VDD < 2.0 V — — — — VDD x 0.2 0.4 V V 25 °C — 11136 — ADC counts — 35 — ADC counts/°C SCL, SDA, INT Output Low Voltage Temperature Sensor Offset Symbol VOL Temperature Sensor Gain –0.3 –0.11 –0.06 –0.03 –0.01 –0.008 –0.007 –0.008 –0.3 –0.06 –0.03 –0.01 Notes: 1. Unless specifically stated in "Conditions", electrical data assumes ambient light levels < 1 klx. 2. Proximity-detection performance may be degraded, especially when there is high optical crosstalk, if the LED supply and voltage drop allow the driver to saturate and current regulation is lost. 3. Guaranteed by design and characterization. 4. Represents the time during which the device is drawing a current equal to Iactive for power estimation purposes. Assumes default settings. 8 Rev. 1.41 Si1141/42/43 Table 3. I2C Timing Specifications Parameter Symbol Min Typ Max Unit Clock Frequency fSCL 0.09 — 3.4 MHz Clock Pulse Width Low tLOW 160 — — ns Clock Pulse Width High tHIGH 60 — — ns Rise Time tR 10 — 40 ns Fall Time tF 10 — 40 ns Start Condition Hold Time tHD.STA 160 — — ns Start Condition Setup Time tSU.STA 160 — — ns Input Data Setup Time tSU.DAT 10 — — ns Input Data Hold Time tHD.DAT 0 — — ns Stop Condition Setup Time tSU.STO 160 — — ns Min Typ Max Unit VDD Supply Voltage –0.3 — 4 V Operating Temperature –40 — 85 °C Storage Temperature –65 — 85 °C Table 4. Absolute Maximum Limits Parameter Condition LED1, LED2, LED3 Voltage at VDD = 0 V, TA < 85 °C –0.5 — 3.6 V INT, SCL, SDA Voltage at VDD = 0 V, TA < 85 °C –0.5 — 3.6 V Maximum total current through LED1, LED2 and LED3 — — 500 mA Maximum total current through GND — — 600 mA — — — — — — 2 225 2 kV V kV ESD Rating Human Body Model Machine Model Charged-Device Model Rev. 1.41 9 Si1141/42/43 1.2. 典型性能图 Figure 3. Proximity response using Kodak gray cards, PS_RANGE=0, PS_ADC_GAIN=0 (single 25.6s LED pulse), ± 22°LED view angle, 850 nm, 22.5 mW/sr, no overlay, 5 mm LED center to Si114x center Figure 4. ALS variability with different light sources 10 Rev. 1.41 Si1141/42/43 Figure 5. View angle, large photodiode rotated around the pin-5/pin-10 (“vertical”) axis Figure 6. View angle, large photodiode rotated around “horizontal”axis and small photodiode rotated around either axis Rev. 1.41 11 Si1141/42/43 2. 功能描述 2.1. 简介 Si1141/42/43 是有源光学反射临近探测器和环境光传感器,其运行状态可通过寄存器控制,这些寄存器可通过 I2C 接口使用。主机可以命令 Si1141/42/43 启动按需临近探测或环境光感应。主机还可以将 Si1141/42/43 置于自发运行 状态,在此状态中,它按设定间隔执行测量,并在完成每次测量后或每当超过设定阈值时中断主机。这导致整体系 统节电,允许主机控制器在休眠状态下运行更长时间,而不轮询 Si1141/42/43。有关更多详细信息,请参阅 “AN498: Si114x 设计者指南 ”。 2.2. 临近感应 (PS) Si1141/42/43 已被优化用作双端口或单端口的活跃反射临近探测器。在短于 50 cm 的距离内,双端口有源反射临近 探测器比基于运动的单端口红外线系统有显著优势,基于运动的单端口红外线系统仅适用于已触发事件。基于运动 的红外线探测器可识别临近的物体,但这些物体必须是正在移动才能识别。即使静止物体在临近场地内,基于运动 的单端口红外线系统对于这些物体也没什么反应。即使物体没有正在移动或很缓慢地移动, Si1141/42/43 也可以可 靠地探测到进入或退出指定临近场地的物体。然而,在大约 30–50 cm 外,即使光学隔离效果良好,由于桌面、墙 等旁边物体的静止反射,可能必须进行单端口信号处理。如果运动探测可以接受, Si1141/42/43 通过单个产品窗口 可以实现高达 50 cm 的范围。 对于小物体,反射率的降低多达距离的四次方。这意味着距离模糊性比基于运动的无源器件低。例如,物体反射率 变化十六倍,意味着探测范围仅缩小 50%。 Si1143 可以驱动三个单独的红外线 LED。将这三个红外线 LED 放入 L 形配置中时,可以对三维临近场地内的物体 进行三角测量。因此,可以借助主机软件实施非接触用户界面。 在接到主机的明确命令时, Si1141/42/43 可以启动临近感应测量,或者可以通过自发流程定期启动临近感应测量。 有关 Si1141/42/43 运行模式的更多详细信息,请参阅第 17 页上 “3. 运行模式 ”。 每当到了进行 PS 测量的时候, Si1141/42/43 进行多达三次测量,具体视在 CHLIST 参数中启用了什么参数而定。 还可以修改这些测量的其他 ADC 参数,允许在不同环境光条件下正常运行。 在这三次测量中,都可以对 LED 选择进行设定。默认情况下,每次测量打开一个 LED 驱动器。但是,可以容易地 颠倒测量顺序,或者让所有 LED 同时打开。根据情况,可以将每次临近测量值与主机设定的阈值进行比较。每个 PS 通道都有阈值设置,因此每当超过阈值时, Si1141/42/43 可以通知主机。这可以降低主机的中断次数,使软件算法 有效。 Si1141/42/43 还可以在一整套临近测量后生成中断,忽略任何阈值设置。 为了动态支持不同的电源使用效率情形,每个输出的红外线 LED 电流都可以独立设定。电流可以设定为几毫安到几 百毫安之间的任何值。因此,主机可以动态地为临近探测性能或节能优化。此功能可能非常有用,因为它允许主机 在一个物体已进入临近范围后降低 LED 电流,而且在采用较低的电流设置时仍然可以跟踪该物体。最后,通过灵活 的电流设置,可以采用受控制的电流吸收器控制红外线 LED 电流,从而提高精确度。 ADC 属性可设定。对于室内运行, ADC 应配置为低信号范围,以获得最佳反射灵敏度。在高环境条件下时, ADC 应配置为高信号电平范围运行。 在低信号范围中运行时,在环境光照度较高的情况下,可能会使 ADC 饱和。任何溢出状况都会在 RESPONSE 寄存 器中报告,相应的数据寄存器报告 0xFFFF 值。然后,主机可以调节 ADC 灵敏度。但请注意,溢出状况并不是棘手 的问题。如果光照度恢复到 ADC 能力内的范围,相应的数据寄存器将开始正常运行。但是, RESPONSE 寄存器将 继续保持溢出状况到收到 NOP 命令为止。即使 RESPONSE 寄存器具有溢出状况,仍然会接受并处理命令。 通过选择更长的积分时间,没有透镜作用也可以实现超过 50 cm 和多达几米的临近探测范围。通过算出多次测量结果 的平均值,即使环境光照度较高,也可以进一步加大探测范围。请参阅 “AN498:Si114x 设计者指南 ” 中的详细信息。 12 Rev. 1.41 Si1141/42/43 2.3. 环境光 Si1141/42/43 具有能够同时测量可见光和红外光的光电二极管。但是,可见光光电二极管也受红外光影响。测量照 明度时,需要与人眼相同的光谱响应。如果需要准确测量照明度,则必须补偿可见光光电二极管的额外 IR 响应。因 此,为了让主机可以对红外光的影响进行校正, Si1141/42/43 在单独通道报告红外光测量结果。单独的可见光光电 二极管和 IR 光电二极管适合于各种算法解决方案。然后,主机可以执行这两次测量,运行算法以推导出与人眼感觉 相当的照明度。在主机中运行 IR 校正算法可以非常灵活地调节系统相关变量。例如,如果在系统中使用的玻璃阻止 的可见光超过红外光,则需要调节 IR 校正。 如果主机没有进行任何红外线校正,则可以在 CHLIST 参数中关闭红外线测量。 默认情况下,针对室内环境光照度优化了测量参数,可以探测低至 6 lx 的光照度。为了在阳光直射的情形中运行, 可以将 ADC 设定为在高信号运行条件下运行,以便可以测量阳光直射而不会使 16 位结果溢出。 对于低照度应用,可以延长 ADC 积分时间。通常,积分时间是 25.6 µs。将此积分时间延长到 410 µs 后, ADC 可 以探测低至 1 lx 的光照度。可以对 ADC 设定长达 3.28 ms 的积分时间,允许测量高达 100 mlx 的光照度。可见光 环境测量的 ADC 积分时间与红外光环境测量的 ADC 积分时间可以分别设定。有了独立的 ADC 参数,就可以在红 外光透光率高于可见光透光率的玻璃罩下运行。 在低信号范围中运行或当积分时间延长时,在环境光照度突然升高的情况下,可能会使 ADC 饱和。任何溢出状况都 会在 RESPONSE 寄存器中报告,相应的数据寄存器报告 0xFFFF 值。根据这两个溢出指示器中的任一个,主机可 以调节 ADC 灵敏度。但是,溢出状况并不是棘手的问题。如果光照度恢复到 ADC 能力内的范围,相应的数据寄存 器将开始正常运行。RESPONSE 寄存器将继续保持溢出状况到收到 NOP 命令为止。即使 RESPONSE 寄存器具有 溢出状况,仍然会接受并处理命令。 在接到主机的明确命令时, Si1141/42/43 可以启动 ALS 测量,或者可以通过自发流程定期启动 ALS 测量。有关 Si1141/42/43 运行模式的更多详细信息,请参阅第 17 页上 “3. 运行模式 ”。转换频率设置可设定,与临近传感器无 关。这样,临近传感器和环境光传感器便可以采用不同转换率运行,从而加强主机对 Si1141/42/43 的控制。 自发运行时,与临近传感器相比, ALS 具有略微不同的中断结构。在每个样本中,或当环境光变化时,可以向主机 生成中断。 “ 环境光变化 ” 中断通过结合两个阈值形成一个范围来实现。只要环境光保持在这两个阈值定义的范围内,就不会中 断主机。当环境光变化并且超过任一阈值时,将向主机发送一个中断,从而允许通知主机环境光已变化。主机可以 使用此中断触发照明度值的重新计算。 此范围可以应用于可见光环境测量或红外光环境测量,但不能同时应用于两者。但是,监测任一通道的环境变化应 允许通知环境光照度已变化。 Rev. 1.41 13 Si1141/42/43 NormalizedPhotodiodeResponse 1 VIS IR 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 250 350 450 550 650 750 850 950 1050 Wavelength(nm) Figure 7. Photodiode Spectral Response to Visible and Infrared Light (Indicative) 2.4. 主机接口 Si1141/42/43 的主机接口由三个引脚组成: SCL SDA INT SCL 和 SDA 是 I2C 运行所需的标准开路漏极引脚。 Si1141/42/43 使 INT 引脚有效以中断主机处理器。INT 引脚是开路漏极输出。为了正常运行,需要一个上拉电阻器。 开路漏极输出可以与系统中的其他开路漏极中断来源共享。 为了正常运行, Si1141/42/43 在 I2C 上进行任何活动之前,应完全完成其初始化模式。 设计 INT、SCL 和 SDA 引脚的目的是使 Si1141/42/43 可以通过软件命令进入关闭模式,而不会干扰总线上其他 I2C 器件的正常运行。 Si1141/42/43 I2C 从地址是 0x5A。 Si1141/42/43 也响应全局地址 (0x00) 和全局复位命令 (0x06)。仅支持 7 位 I2C 地址;不支持 10 位 I2C 地址。 从概念上讲, I2C 接口允许访问 Si1141/42/43 内部寄存器。第 29 页上表 15 汇总了这些寄存器。 I2C 写访问始终以开始 (或重新开始)条件开始。开始条件后的第一个字节是 I2C 地址和读写位。第二个字节指定 Si1141/42/43 内部寄存器的起始地址。随后的字节按顺序写入 Si1141/42/43 内部寄存器中,直到遇到停止条件为 止。只有两个字节的 I2C 写访问通常用于设置 Si1141/42/43 内部地址以准备进行 I2C 读取。 I2C 读访问像 I2C 写访问一样,以开始或重新开始条件开始。在 I2C 读取中,I2C 主模块继续为 SCK 计时,使 Si1141/ 42/43 可以使用内部寄存器内容驱动 I2C。 Si1141/42/43 还支持突发读取和突发写入。突发读取在收集相邻的连续寄存器中很有用。 Si1141/42/43 寄存器映射 的设计目的是优化中断处理程序的突发读取,突发写入的目的是方便快速设定常用字段,例如阈值寄存器。 内部寄存器地址是六位 (位 5 至位 0)加上自动递增禁用 (在位 6)。默认情况下,自动递增禁用被关闭。通过禁 用自动递增功能,使主机可以反复轮询任何单个内部寄存器,而不必在每当读取寄存器时保持更新 Si1141/42/43 内 部地址。 14 Rev. 1.41 Si1141/42/43 建议当 Si1141/42/43 使 INT 有效时,主机应读取 PS 或 ALS 测量结果(在 I2C 寄存器映射中)。虽然主机可以随时 读取 Si1141/42/43 的任何 I2C 寄存器,但在中断处理程序的上下文之外读取 2 字节测量结果时必须谨慎。当内部定 序器碰巧正在更新 2 字节测量结果时,主机可能读取这个测量结果的部分内容。发生这种情况时,主机可能读取混 合 2 字节数量,其高位字节和低位字节是不同样本的部分。如果主机必须在中断处理程序的上下文之外读取这些 2 字节寄存器,如果测量结果与上一个读数有很大偏差,主机应 “ 复查 ” 该测量结果。 I2C 广播复位:I2C 广播复位应该在任何 I2C 寄存器访问 Si114x 之前发送。如果在 I2C 广播复位发出时,任何 I2C 寄 存器或或参数已经写入到 Si114x,则主机必须发送一个复位命令并对 Si114x 进行完全重新初始化。 SCL SDA SLA6 START SLA5-0 Slave Address + R/W R/W D7 ACK D6-0 Data Byte NACK STOP Figure 8. I2C Bit Timing Diagram Figure 9. Host Interface Single Write Figure 10. Host Interface Single Read Figure 11. Host Interface Burst Write Figure 12. Host Interface Burst Read Rev. 1.41 15 Si1141/42/43 Figure 13. Si1141/42/43 REG ADDRESS Format 注释 : 灰盒由主机推动到 Si1141/42/43 白盒由 Si1141/42/43 推动到主机 A = ACK 或 “ 确认 ” N = NACK 或 “ 无确认 ” S = 开始条件 Sr = 重复开始条件 P = 停止条件 AI = 设置时禁用自动递增 16 Rev. 1.41 Si1141/42/43 3. 运行模式 Si1141/42/43 在任何时候可以处于众多运行模式中的一种。必须考虑运行模式,因为该模式对 Si1141/42/43 的整体 功耗有影响。各种模式如下: 关闭模式 初始化模式 备用模式 强制转换模式 自发模式 3.1. 关闭模式 当 VDD 未连接到电源设备或 VDD 电压低于电气规格中所述的规定 VDD_OFF 电压时,Si1141/42/43 处于关闭模式。 只要不违反第 9 页上表 4, “Absolute Maximum Limits,” 中叙述的参数,就没有电流流过 Si1141/42/43。在关闭模式 中, Si1141/42/43 SCL 和 SDA 引脚不会干扰总线上的其他 I2C 器件。 LED 引脚不会消耗通过红外二极管的电流。 使 VDD 低于 VDD_OFF 不是用于实现最低系统电流消耗量的方法。原因在于 SCL、 SDA 和 INT 引脚上的 ESD 保 护器件也来自通过 VDD 的电流通路。例如,如果 VDD 接地,则电流通过 SCL、 SDA 和 INT 上拉电阻器及 ESD 保 护器件从系统电源流到系统接地。 允许 VDD 小于 VDD_OFF 旨在充当无专用复位引脚情况下复位 Si1141/42/43 的硬件方法。 在收到一般 I2C 复位或启动软件复位序列后, Si1141/42/43 也可以重新进入关闭模式。使用这些软件方法之一进入 关闭模式时, Si1141/42/43 通常直接从关闭模式进入初始化模式。 3.2. 初始化模式 当 VDD 通电并且电压高于第 4 页上表 1, “Recommended Operating Conditions,” 中所述的最低 VDD 电源电压时, Si1141/42/43 就进入初始化模式。在初始化模式中, Si1141/42/43 执行初始启动序列。由于 I2C 尚未有效,因此建 议在这个短暂的初始化模式期间,不进行任何 I2C 活动。表 1 中的 “Start-Up Time” 规格是主机在通电序列之后发送 任何 I2C 访问之前需要等待的最短建议时间。初始化模式完成后, Si1141/42/43 进入备用模式。为了正常运行,主 机必须将 0x17 写入到 HW_KEY 寄存器。 3.3. 备用模式 Si1141/42/43 大部分时间都处于备用模式。 Si1141/42/43 完成初始化模式序列后,就进入备用模式。处于备用模式 时, Si1141/42/43 不执行任何环境光测量或临近探测功能。但是, I2C 接口处于有效状态并且随时可以接受到 Si1141/42/43 寄存器的读取和写入。内部数字顺序控制器处于休眠状态,不会消耗很多电源。此外, INT 输出保持 状态到其被主机清除为止。 I2C 访问不一定会导致 Si1141/42/43 退出备用模式。例如,数字顺序控制器不必从休眠状态唤醒,即可完成 Si1141/ 42/43 寄存器读取。 3.4. 强制转换模式 在 主 机 处 理 器 的 特 定 命 令 情 况 下, Si1141/42/43 可 以 在 强 制 转 换 模 式 中 运 行。如 果 发 出 ALS_FORCE 或 PS_FORCE 命令,就会进入强制转换模式。转换完毕后,如果启用了相应中断, Si1141/42/43 可以向主机生成中 断。通过使用 PSALS_FORCE 命令,可以使用一个命令寄存器写访问启动 ALS 和多次 PS 测量。 Rev. 1.41 17 Si1141/42/43 3.5. 自发运行模式 可以将 Si1141/42/43 置于自发运行模式,在此模式中,不必为每次测量发出明确的主机命令,即可自动执行测量。 PS_AUTO、 ALS_AUTO 和 PSALS_AUTO 命令用于将 Si1141/42/43 置于自发运行模式。 Si1141/42/43 自动更新 PS 和 ALS 的 I2C 寄存器。在 I2C 映射中,为每次测量分配一个 16 位寄存器。Si1141/42/43 可以无中断运行。这样做时,主机轮询率必须至少是转换率频率的两倍,主机才能始终收到新测量结果。主机还可 以通过启用中断,选择在这些新测量结果可用时收到通知。 在 PS_AUTO、 ALS_AUTO 或 PSALS_AUTO 命令之前,主机设置 PS 和 ALS 测量的转换频率。主机可以设置与 ALS 转换频率不同的 PS 转换频率。但是,这两个频率都必须是 I2C 映射中 MEAS_RATE 寄存器中基本转换频率的 倍数。 PS 或 ALS 测量结果到达预设的阈值时, Si1141/42/43 可以中断主机。为了帮助处理中断,对寄存器进行调整,使 中断处理程序能够执行 I2C 突发读取操作以读取必要的寄存器,以中断状态寄存器开始,并循环通过 ALS 数据寄存 器,接着是各个临近读数。 18 Rev. 1.41 Si1141/42/43 4. 编程指南 4.1. 命令和响应结构 在读取或写入所有 Si1141/42/43 I2C 寄存器(除了写入 COMMAND 寄存器之外)时都不唤醒内部定序器。第 29 页 上 “4.5. I2C 寄存器 ” 完整列出了 I2C 寄存器。除了 I2C 寄存器之外,RAM 参数是内部定序器维护的存储器位置。这 些 RAM 参数可通过命令协议访问 (请参阅第 52 页上 “4.6. 参数 RAM”)。第 52 页上 “4.6. 参数 RAM” 完整列出了 RAM 参数。 Si1141/42/43 可以在强制测量模式或自发模式中运行。处于强制测量模式时,除非主机通过特定命令明确请求 Si1141/42/43 进行测量,否则 Si1141/42/43 不进行任何测量 (请参阅第 3.2 节)。需要写入 CHLIST 参数,以便让 Si1141/42/43 知道要进行哪些测量。参数 MEAS_RATE 为零时会将内部定序器置于强制测量模式。处于强制测量模 式时,仅当主机写入 COMMAND 寄存器时,内部定序器才唤醒。处于强制测量模式时 (MEAS_RATE = 0),耗电量 最低。 当 MEAS_RATE 不是零时,Si1141/42/43 在自发运行模式中运行。MEAS_RATE 表示 Si1141/42/43 定期唤醒的时 间间隔。内部定序器唤醒后,定序器根据 PS_RATE 和 ALS_RATE 寄存器管理内部 PS 计数器和 ALS 计数器。 当内部 PS 计数器过期时,根据通过 CHLIST 参数高位启用了哪些测量,最多执行三个临近测量 (PS1、 PS2 和 PS3)。按顺序执行这三个 PS 测量,从 PS1 测量通道开始。同样,当 ALS 计数器过期时,根据通过 CHLIST 参数 高位启用了哪些测量,最多执行三个测量(ALS_VIS、ALS_IR 和 AUX)。按以下顺序执行这三个测量: ALS_VIS、 ALS_IR 和 AUX。 PS_RATE 和 ALS_RATE 通常不是零。PS_RATE 或 ALS_RATE 值为零时,将导致内部定序器永不执行该测量组。 通常, PS_RATE 或 ALS_RATE 值为 1。值为 1 时,基本上说明每当器件唤醒时执行特定测量组。 PS 计数器和 ALS 计数器可能同时过期。发生这种情况时,先执行 PS 测量,再执行 ALS 测量。执行了所有测量后, 内部定序器恢复到休眠状态,直到 MEAS_RATE 参数规定的下一次为止。 Si1141/42/43 操作可以描述为一些常见因素绑定的两个测量组。 PS 测量组由三个 PS 测量组成,而 ALS 测量组由 可见光环境测量 (ALS_VIS)、红外光环境测量 (ALS_IR) 和辅助测量 (AUX) 组成。每个测量组各有三个测量。通道 列表 (CHLIST) 参数启用该测量组的特定测量。 每个测量(PS1、PS2、PS3、ALS_VIS、ALS_IR、AUX)通过结合使用 I2C 寄存器或参数 RAM 控制。下面的表 7 至 9 汇总了每次测量所用的属性和资源。 Rev. 1.41 19 Si1141/42/43 4.2. 命令协议 I2C 映射在主机和 Si1141/42/43 定序器之间实施双向消息框。主机可写入的 I2C 寄存器有助于主机至 Si1141/42/43 的通信,而只读 I2C 寄存器用于 Si1141/42/43 至主机的通信。 与其他主机可写入的 I2C 寄存器不同的是, COMMAND 寄存器导致内部定序器从备用模式唤醒,以处理主机请求。 执行命令时,将更新 RESPONSE 寄存器。通常,没有错误时,高四位为零。为了允许命令跟踪,低四位实施 4 位 循环计数器。一般而言,如果 RESPONSE 寄存器的高半字节不是零,表示有错误或需要特殊处理。 PARAM_WR 和 PARAM_RD 寄存器是附加的邮箱寄存器。 除了 I2C 映射中的寄存器之外,还有可通过 “Command/Response” (命令 / 响应)界面访问的环境参数。这些参数 存储在内部 RAM 空间中。这些参数一般接受更多 I2C 访问以便进行读写。第 52 页上 “4.6. 参数 RAM” 介绍了参数 RAM。 每次写入 Command 寄存器都需要以下顺序: 1. 将 0x00 写入到 Command 寄存器以清空 Response 寄存器。 2. 读取 Response 寄存器并验证内容为 0x00。 3. 将 Command 值从 表 5 写入 Command 寄存器。 4. 读取 Response 寄存器并验证现在内容非零。如果内容仍为 0x00,重复此步骤。 注释: 步骤 4 不适用于 Reset Command,因为设备将重置,而重置后不会增加 Response 寄存器。发出 Reset 之后至少 1 ms 内不应向设备发出任何命令。 成功完成一个命令后, Response 寄存器将成功增加。如果 Response 寄存器在 Command 写入后保持 0x00 超过 25 ms,则整个 Command 流程都应该从步骤 1 开始重复。 Table 5. Command Register Summary COMMAND Register Name Encoding PARAM_QUERY 100 aaaaa 20 PARAM_W R Register PARAM_RD Register Error Code in RESPONSE Register — nnnn nnnn Reads the parameter pointed to by bitfield [4:0] and writes value to PARAM_RD. See ? 10 for parameters. Description PARAM_SET 101 aaaaa dddd dddd nnnn nnnn Sets parameter pointed by bitfield [4:0] with value in PARAM_WR, and writes value out to PARAM_RD. See ? 10 for parameters. PARAM_AND 110 aaaaa dddd dddd nnnn nnnn Performs a bit-wise AND between PARAM_WR and Parameter pointed by bitfield [4:0], writes updated value to PARAM_RD. See ? 10 for parameters. PARAM_OR 111 aaaaa dddd dddd nnnn nnnn Performs a bit-wise OR of PARAM_WR and parameter pointed by bitfield [4:0], writes updated value to PARAM_RD. See ? 10 for parameters. Rev. 1.41 Si1141/42/43 Table 5. Command Register Summary (Continued) COMMAND Register Name Encoding PARAM_W R Register PARAM_RD Register Error Code in RESPONSE Register NOP 000 00000 — — Forces a zero into the RESPONSE register RESET 000 00001 — — Performs a software reset of the firmware BUSADDR 000 00010 — — — Modifies I2C address Reserved 000 00011 — — — — Reserved 000 00100 — — — — PS_FORCE 000 00101 — — Forces a single PS measurement ALS_FORCE 000 00110 — — Forces a single ALS measurement PSALS_FORCE 000 00111 — — Forces a single PS and ALS measurement Reserved 000 01000 — — — PS_PAUSE 000 01001 — — Pauses autonomous PS ALS_PAUSE 000 01010 — — Pauses autonomous ALS PSALS_PAUSE 000 01011 — — Pauses PS and ALS Reserved 000 01100 — — PS_AUTO 000 01101 — — Starts/Restarts an autonomous PS Loop ALS_AUTO 000 01110 — — Starts/Restarts an autonomous ALS Loop PSALS_AUTO 000 01111 — — Starts/Restarts autonomous ALS and PS loop Reserved 000 1xxxx — — — — Rev. 1.41 Description — — 21 Si1141/42/43 Table 6. Response Register Error Codes RESPONSE Register 22 Description 0000 cccc NO_ERROR. The lower bit is a circular counter and is incremented every time a command has completed. This allows the host to keep track of commands sent to the Si1141/42/43. The circular counter may be cleared using the NOP command. 1000 0000 INVALID_SETTING. An invalid setting was encountered. Clear using the NOP command. 1000 1000 PS1_ADC_OVERFLOW. Indicates proximity channel one conversion overflow. 1000 1001 PS2_ADC_OVERFLOW. Indicates proximity channel two conversion overflow. 1000 1010 PS3_ADC_OVERFLOW. Indicates proximity channel three conversion overflow. 1000 1100 ALS_VIS_ADC_OVERFLOW. Indicates visible ambient light channel conversion overflow. 1000 1101 ALS_IR_ADC_OVERFLOW. Indicates infrared ambient light channel conversion overflow. 1000 1110 AUX_ADC_OVERFLOW. Indicates auxiliary channel conversion overflow. Rev. 1.41 Si1141/42/43 4.3. 资源汇总 Table 7. Resource Summary for Interrupts and Threshold Checking Measurement Channel Channel Enable Interrupt Status Output Interrupt Enable Interrupt Mode Proximity Sense 1 EN_PS 1 in CHLIST [0] PS1_INT in IRQ_STATUS[2] PS1_IE in IRQ_ENABLE[2] Proximity Sense 2 EN_PS 2 in CHLIST [1] PS2_INT in IRQ_STATUS[3] Proximity Sense 3 EN_PS 3 in CHLIST [2] PS3_INT in IRQ_STATUS[4] ALS Visible EN_AL S_VIS in CHLIST [4] ALS IR EN_AL S_IR in CHLIST [5] Auxiliary Measurement EN_AU X in CHLIST [6] ALS_INT[1:0] in IRQ_STATUS[1:0] — Threshold Registers Threshold Hysteresis History Checking Autonomous Measurement Time Base PS1_IM[1:0] in IRQ_MODE1[5:4] PS1_TH[7:0] PS_HYST[7: 0] PS_HISTORY[7:0] MEAS_RATE[ PS_RATE[7: 7:0] 0] PS2_IE in IRQ_ENABLE[3] PS2_IM[1:0] in IRQ_MODE1[7:6] PS2_TH[7:0] PS3_EN in IRQ_ENABLE[4] PS3_IM[1:0] in IRQ_MODE2[1:0] PS3_TH[7:0] ALS_IE[1:0] in ALS_IM[2:0] in ALS_LOW_TH[7 ALS_HYST[ :0] / 7:0] IRQ_IRQ_ENMODE1[2:0] ALS_HI_TH[7:0] ABLE[1:0] ALS_HISTORY[7:0] ALS_RATE[ 7:0] — — — Rev. 1.41 — — 23 Si1141/42/43 Table 8. Resource Summary for LED Choice and ADC Parameters Measure ment Channel LED Selection Proximity Sense 1 PS1_LED[2: 0] in PSLED12_S ELECT[2:0] Proximity Sense 2 PS2_LED[2: 0] in PSLED12_S ELECT[6:4] Proximity Sense 3 PS3_LED[2: 0] in PSLED3_SE LECT[2:0] ALS Visible — ADC Input Source ADC Recovery Count ADC High Signal Mode ADC Clock Divider ADC Alignment ADC Offset PS1_DATA1[7:0] / PS1_DATA0[7:0] PS1_ADCMUX[7:0] PS_ADC_REC in PS_ADC_COUNTER [6:4] PS_RANGE in PS_ADC_MISC[5] PS_ADC_GAIN[3:0] PS1_ALIGN in PS_ENCODING[4] ADC_ OFFSET [7:0] PS2_DATA1[7:0] / PS2_DATA0[7:0] PS2_ADCMUX[7:0] PS2_ALIGN in PS_ENCODING[5] PS3_DATA1[7:0] / PS3_DATA0[7:0] PS3_ADCMUX[7:0] PS3_ALIGN in PS_ENCODING[6] ADC Mode ADC Output PS_ADC_MODE in PS_ADC_MISC[2] ALS_VIS_DATA1 / ALS_VIS_DATA0 VIS_ADC_REC VIS_RANGE in in ALS_VIS_AD- ALS_VIS_ADC_MISC[5] C_COUNTER [6:4] ALS_VIS_ADC_GAIN [3:0] ALS_VIS_AL IGN in ALS_ENCODING[4] ALS IR ALS_IR_DATA1[7:0] / ALS_IR_DATA0[7:0] IR_ADC_REC in IR_RANGE in ALS_IR_ADALS_IR_ADC_C_COUNTER MISC[5] [6:4] ALS_IR_ADC_GAIN [3:0] ALS_IR_ALI GN in ALS_ENCODING[5] Auxiliary Measurement AUX_DATA1[7:0] / AUX_DATA0[7:0] — — 24 — AUX_ADCMUX[7:0] Rev. 1.41 — — Si1141/42/43 Table 9. Resource Summary for Hardware Pins Pin Name LED Current Drive LED1 LED1_I in PSLED12[3:0] LED2 LED2_I in PSLED12[7:4] HW_KEY[7:0] LED3 LED3_I in PSLED3[3:0] HW_KEY[7:0] INT Output Drive Disable Analog Voltage Input Enable ANA_IN_KEY[31:0] INT_OE in INT_CFG[0] ANA_IN_KEY[31:0] ANA_IN_KEY[31:0] Si1141/42/43 中断通过 INT_CFG、 IRQ_ENABLE、 IRQ_MODE1、 IRQ_MODE2 和 IRQ_STATUS 寄存器控制。 INT 硬件引脚通过 INT_CFG 寄存器中的 INT_OE 位启用。硬件基本上在 IRQ_ENABLE 寄存器和 IRQ_STATUS 寄 存器之间执行 “ 与 ” 功能。执行 “ 与 ” 功能后,如果设置了任何位,将使 INT 引脚有效。从概念上讲, INT_CFG 寄 存 器 中 的 INT_MODE 位 是 一 种 确 定 如 何 使 INT 引 脚 无 效 的 方 法。当 INT_MODE = 0 时,主 机 负 责 通 过 写 入 IRQ_STATUS 寄存器清除中断。向 IRQ_STATUS 寄存器的特定位写入 '1' 时,将清除该特定 IRQ_STATUS 位。 通常,主机软件应读取 IRQ_STATUS 寄存器,存储本地副本,然后将相同值写回 IRQ_STATUS 以清除中断来源。 除非明确说明,对于正常中断处理操作, INT_MODE 应为零。总之,通常向 INT_CFG 寄存器写入 '1'。 IRQ_MODE1、IRQ_MODE2 和 IRQ_ENABLE 寄存器配合使用,定义内部定序器如何设置 IRQ_STATUS 寄存器中 的位 (因此,使 INT 引脚有效)。 表 10 介绍了 PS1 中断。表 11 介绍了 PS2 中断。 表 12 介绍了 PS3 中断。表 13 介绍了 ALS 中断,表 14 介绍了 命令界面中断。 Rev. 1.41 25 Si1141/42/43 Table 10. PS1 Channel Interrupt Resources IRQ_ENABLE[2] IRQ_MODE1[5:4] PS1_IE Description PS1_IM[1:0] 0 0 0 No PS1 Interrupts 1 0 0 PS1_INT set after every PS1 sample 1 0 1 PS1_INT set whenever PS1 threshold (PS1_TH) is crossed 1 1 1 PS1_INT set whenever PS1 sample is above PS1 threshold (PS1_TH) Note: There is hysteresis applied (PS_HYST) and history checking (PS_HISTORY). PS_HYST is encoded in 8-bit compressed format. In the Si114x, PS1_TH is also encoded in compressed format. Table 11. PS2 Channel Interrupt Resources IRQ_ENABLE[3] IRQ_MODE1[7:6] PS2_IE Description PS2_IM[1:0] 0 0 0 No PS2 Interrupts 1 0 0 PS2_INT set after every PS2 sample 1 0 1 PS2_INT set whenever PS2 threshold (PS2_TH) is crossed 1 1 1 PS2_INT set when PS2 sample is above PS2 threshold (PS2_TH) Note: There is hysteresis applied (PS_HYST) and history checking (PS_HISTORY). PS_HYST is encoded in 8-bit compressed format. In the Si114x, PS2_TH is also encoded in compressed format. Table 12. PS3 Channel Interrupt Resources IRQ_ENABLE[4] IRQ_MODE2[1:0] PS3_IE Description PS3_IM[1:0] 0 0 0 No PS3 Interrupts 1 0 0 PS3_INT set after every PS3 sample 1 0 1 PS3_INT set whenever PS3 threshold (PS3_TH) is crossed 1 1 1 PS3_INT set whenever PS3 sample is above PS3 threshold (PS3_TH) Note: There is hysteresis applied (PS_HYST) and history checking (PS_HISTORY). PS_HYST is encoded in 8-bit compressed format. In the Si114x, PS3_TH is also encoded in compressed format. 26 Rev. 1.41 Si1141/42/43 Table 13. Ambient Light Sensing Interrupt Resources IRQ_ENABLE[1:0] IRQ_MODE1[2:0] ALS_IE[1:0] ALS_IM[2:0] Description 0 0 0 0 0 No ALS Interrupts 0 1 0 0 0 ALS_INT [0] set after every ALS_VIS sample1 x 1 x 0 1 Monitors ALS_VIS, ALS_INT [0] upon exiting region between low and high thresholds (ALS_LOW_TH and ALS_HI_TH) 1 x 1 0 x Monitors ALS_VIS, ALS_INT [1] set upon entering region between low and high thresholds (ALS_LOW_TH and ALS_HI_TH) x 1 x 1 1 Monitors ALS_IR, ALS_INT [0] set upon exiting region between low and high thresholds (ALS_LOW_TH and ALS_HI_TH) 1 x 1 1 x Monitors ALS_IR, ALS_INT [1] set upon entering region between low and high thresholds (ALS_LOW_TH and ALS_HI_TH) Notes: 1. For ALS_IR channel, interrupts per sample is not possible without also enabling ALS_VIS 2. All other combinations are invalid and may result in unintended operation 3. There is hysteresis applied (ALS_TH) and history checking (ALS_HISTORY). ALS_HYST is encoded in 8-bit compressed format. 4. In the Si114x, ALS_LOW_TH and ALS_HI_TH are also encoded in compressed format. Table 14. Command Interrupt Resources IRQ_ENABLE[5] IRQ_MODE2[3:2] CMD_IE CMD_IM[1:0] Description 0 x 0 No CMD Interrupts 1 x 0 CMD_INT set when there is a new RESPONSE 1 x 1 CMD_INT set when there is a new error code in RESPONSE Rev. 1.41 27 Si1141/42/43 4.4. 信号通路软件模型 下图概述了信号通路,以及控制它们的 I2C 寄存器和 RAM 参数位字段。随后几节详细介绍 I2C 寄存器和参数 RAM。 5 4 3 2 PS1_ADCMUX ADC_OFFSET D Vdd Analog Range Gain Recov. time Rate Align Select 0 2 3 6 Out 0x25 0x65 0x75 Ref. 1 PS1_ALIGN PS_RATE PS_ADC_REC PS_ADC_GAIN PS_RANGE Offset Sum Digital 16 PS1_DATA In D Enable EN_PS1 GND PS2_ALIGN PS_RATE PS_ADC_REC PS_ADC_GAIN PS_RANGE PS2_ADCMUX ADC_OFFSET Ref. Vdd Analog Range Gain Recov. time Rate Align Select 0 2 3 6 Out 0x25 0x65 0x75 Offset Sum Digital 16 PS2_DATA In Enable EN_PS2 GND PS3_ALIGN PS_RATE PS_ADC_REC PS_ADC_GAIN PS_RANGE PS3_ADCMUX C C ADC_OFFSET Ref. Large IR Vdd Analog Range Gain Recov. time Rate Align Select 0 2 3 6 Out 0x25 0x65 0x75 Offset Sum Digital 16 PS3_DATA In Enable EN_PS3 GND ALS_VIS_ALIGN ALS_RATE ALS_VIS_ADC_REC ALS_VIS_ADC_GAIN VIS_RANGE GND B Analog Range Gain Recov. time Rate Align ADC_OFFSET Offset Sum Digital 16 ALS_VIS_DATA B In Enable Small visible EN_ALS_VIS ALS_IR_ALIGN ALS_RATE ALS_IR_ADC_REC ALS_IR_ADC_GAIN IR_RANGE GND ALS_IR_ADCMUX 0 Out Analog 3 Range Gain Recov. time Rate Align ADC_OFFSET Select Offset Sum Digital 16 ALS_IR_DATA In Enable EN_ALS_IR Small IR AUX_ADCMUX A A ADC_OFFSET GND Offset Select Sum 0x65 Temperature sensor Out Vdd Analog Digital 16 16 AUX_DATA In 0x75 Enable EN_AUX 5 4 3 2 Figure 14. Signal Path Programming Model 28 Rev. 1.41 1 Si1141/42/43 4.5. I2C 寄存器 Table 15. I2C Register Summary I2C Register Name Address PART_ID 0x00 PART_ID REV_ID 0x01 REV_ID SEQ_ID 0x02 SEQ_ID INT_CFG 0x03 IRQ_ENABLE 0x04 IRQ_MODE1 0x05 IRQ_MODE2 0x06 HW_KEY 0x07 MEAS_RATE 0x08 MEAS_RATE ALS_RATE 0x09 ALS_RATE PS_RATE 0x0A PS_RATE ALS_LOW_TH0 0x0B ALS_LOW_TH0 ALS_LOW_TH1 0x0C ALS_LOW_TH1 ALS_HI_TH0 0x0D ALS_HI_TH0 ALS_HI_TH1 0x0E ALS_HI_TH1 PS_LED21 0x0F PS_LED3 0x10 PS1_TH0 0x11 PS1_TH0 PS1_TH1 0x12 PS1_TH1 PS2_TH0 0x13 PS2_TH0 PS2_TH1 0x14 PS2_TH1 PS3_TH0 0x15 PS3_TH0 PS3_TH1 0x16 PS3_TH1 PARAM_WR 0x17 PARAM_WR COMMAND 0x18 COMMAND RESPONSE 0x20 RESPONSE 7 6 5 4 CMD_IE PS2_IM PS3_IE 3 2 PS2_IE 1 0 INT_MODE INT_O E PS1_IE PS1_IM ALS_IE ALS_IM CMD_IM PS3_IM HW_KEY LED2_I LED1_I LED3_I Rev. 1.41 29 Si1141/42/43 Table 15. I2C Register Summary (Continued) I2C Register Name Address IRQ_STATUS 0x21 ALS_VIS_DATA0 0x22 ALS_VIS_DATA0 ALS_VIS_DATA1 0x23 ALS_VIS_DATA1 ALS_IR_DATA0 0x24 ALS_IR_DATA0 ALS_IR_DATA1 0x25 ALS_IR_DATA1 PS1_DATA0 0x26 PS1_DATA0 PS1_DATA1 0x27 PS1_DATA1 PS2_DATA0 0x28 PS2_DATA0 PS2_DATA1 0x29 PS2_DATA1 PS3_DATA0 0x2A PS3_DATA0 PS3_DATA1 0x2B PS3_DATA1 AUX_DATA0 0x2C AUX_DATA0 AUX_DATA1 0x2D AUX_DATA1 PARAM_RD 0x2E PARAM_RD CHIP_STAT 0x30 ANA_IN_KEY 0x3B– 0x3E 30 7 6 5 4 3 2 CMD_IN T PS3_IN T PS2_IN T PS1_IN T RUNNING ANA_IN_KEY Rev. 1.41 1 0 ALS_INT SUSPEND SLEEP Si1141/42/43 PART_ID @ 0x00 Bit 7 6 5 4 Name PART_ID Type R 3 2 1 0 3 2 1 0 3 2 1 0 复位值 = 0100 0001 (Si1141) 复位值 = 0100 0010 (Si1142) 复位值 = 0100 0011 (Si1143) REV_ID @ 0x1 Bit 7 6 5 4 Name REV_ID Type R 复位值 = 0000 0000 SEQ_ID @ 0x02 Bit 7 6 5 4 Name SEQ_ID Type R 复位值 = 0000 1000 Bit Name 7:0 SEQ_ID Function Sequencer Revision. 0x01 0x02 0x03 0x08 0x09 Si114x-A01 (MAJOR_SEQ=0, MINOR_SEQ=1) Si114x-A02 (MAJOR_SEQ=0, MINOR_SEQ=2) Si114x-A03 (MAJOR_SEQ=0, MINOR_SEQ=3) Si114x-A10 (MAJOR_SEQ=1, MINOR_SEQ=0) Si114x-A11 (MAJOR_SEQ=1, MINOR_SEQ=1) Rev. 1.41 31 Si1141/42/43 INT_CFG @ 0x03 Bit 7 6 5 4 3 2 1 0 Name INT_MODE INT_OE Type RW RW 复位值 = 0000 0000 Bit Name 7:2 Reserved 1 INT_MODE Function Reserved. Interrupt Mode. The INT_MODE describes how the bits in the IRQ_STATUS Registers are cleared. 0: The IRQ_STATUS Register bits are set by the internal sequencer and are sticky. It is the host's responsibility to clear the interrupt status bits in the IRQ_STATUS register to clear the interrupt. 1: If the Parameter Field PSx_IM = 11, the internal sequencer clears the INT pin automatically. 0 INT_OE INT Output Enable. INT_OE controls the INT pin drive 0: INT pin is never driven 1: INT pin driven low whenever an IRQ_STATUS and its corresponding IRQ_ENABLE bits match 32 Rev. 1.41 Si1141/42/43 IRQ_ENABLE @ 0x04 Bit 7 6 5 4 3 2 1 0 Name CMD_IE PS3_IE PS2_IE PS1_IE ALS_IE Type RW RW RW RW RW 复位值 = 0000 0000 Bit Name Function 7:6 Reserved Reserved. 5 CMD_IE Command Interrupt Enable. Enables interrupts based on COMMAND/RESPONSE activity. 0: INT never asserts due to COMMAND/RESPONSE interface activity. 1: Assert INT pin whenever CMD_INT is set by the internal sequencer. 4 PS3_IE PS3 Interrupt Enable. Enables interrupts based on PS3 Channel Activity. 0: INT never asserts due to PS3 Channel activity. 1: Assert INT pin whenever PS3_INT is set by the internal sequencer. 3 PS2_IE PS2 Interrupt Enable. Enables interrupts based on PS2 Channel Activity. 0: INT never asserts due to PS2 Channel activity. 1: Assert INT pin whenever PS2_INT is set by the internal sequencer. 2 PS1_IE PS1 Interrupt Enable. Enables interrupts based on PS1 Channel Activity. 0: INT never asserts due to PS1 Channel activity. 1: Assert INT pin whenever PS1_INT is set by the internal sequencer. 1:0 ALS_IE ALS Interrupt Enable. Enables interrupts based on ALS Activity. 00: INT never asserts due to ALS activity. 1x: Assert INT pin whenever ALS_INT[1] bit is set by the internal sequencer. x1: Assert INT pin whenever ALS_INT[0] is set by the internal sequencer. Rev. 1.41 33 Si1141/42/43 IRQ_MODE1 @ 0x05 Bit 7 6 5 4 3 2 1 Name PS2_IM PS1_IM ALS_IM Type RW RW RW 0 复位值 = 0000 0000 Bit Name Function 7:6 PS2_IM PS2 Interrupt Mode applies only when PS2_IE is also set. 00: PS2_INT is set whenever a PS2 measurement has completed. 01: PS2_INT is set whenever the current PS2 measurement crosses the PS2_TH threshold. 11: PS2_INT is set whenever the current PS2 measurement is greater than the PS2_TH threshold. 5:4 PS1_IM PS1 Interrupt Mode applies only when PS1_IE is also set. 00: PS1_INT is set whenever a PS1 measurement has completed. 01: PS1_INT is set whenever the current PS1 measurement crosses the PS1_TH threshold. 11: PS1_INT is set whenever the current PS1 measurement is greater than the PS1_TH threshold. 3 Reserved 2:0 ALS_IM Reserved. ALS Interrupt Mode function is defined in conjunction with ALS_IE[1:0]. ALS_IE[1:0] / ALS_IM[2:0]: 00 / 000: Neither ALS_INT[1] nor ALS_INT[0] is ever set. 01 / 000: ALS_INT[0] sets after every ALS_VIS sample. x1 / x01: Monitors ALS_VIS channel, ALS_INT[0] asserts if measurement exits window between ALS_LOW_TH and ALS_HIGH_TH. x1 / x11: Monitors ALS_IR channel, ALS_INT[0] asserts if measurement exits window between ALS_LOW_TH and ALS_HIGH_TH. 1x /10x: Monitors ALS_VIS channel, ALS_INT[1] asserts if measurement enters window between ALS_LOW_TH and ALS_HIGH_TH. 1x /11x: Monitors ALS_IR channel, ALS_INT[1] asserts if measurement enters window between ALS_LOW_TH and ALS_HIGH_TH. Note: The ALS_IM description apples only to sequencer revisions A03 or later. 34 Rev. 1.41 Si1141/42/43 IRQ_MODE2 @ 0x06 Bit 7 6 5 4 3 2 1 0 Name CMD_IM PS3_IM Type RW RW 复位值 = 0000 0000 Bit Name Function 7:4 Reserved Reserved. 3:2 CMD_IM Command Interrupt Mode applies only when CMD_IE is also set. 00: CMD_INT is set whenever the RESPONSE register is written. 01: CMD_INT is set whenever the RESPONSE register is written with an error code (MSB set). 1x: Reserved. 1:0 PS3_IM PS3 Interrupt Mode applies only when PS3_IE is also set. 00: PS3_INT is set whenever a PS3 measurement has completed. 01: PS3_INT is set whenever the current PS3 measurement crosses the PS3_TH threshold. 11: PS3_INT is set whenever the current PS3 measurement is greater than the PS3_TH threshold. HW_KEY @ 0x07 Bit 7 6 5 4 3 Name HW_KEY Type RW 2 1 0 复位值 = 0000 0000 Bit Name 7:0 HW_KEY Function The system must write the value 0x17 to this register for proper Si114x operation. Rev. 1.41 35 Si1141/42/43 MEAS_RATE @ 0x08 Bit 7 6 5 4 3 Name MEAS_RATE Type RW 2 1 0 复位值 = 0000 0000 Bit 7:0 36 Name Function MEAS_RATE MEAS_RATE is an 8-bit compressed value representing a 16-bit integer. The uncompressed 16-bit value, when multiplied by 31.25 us, represents the time duration between wake-up periods where measurements are made. Example Values: 0x00: Turns off any internal oscillator and disables autonomous measurement. Use this setting to achieve lowest VDD current draw for systems making use of only forced measurements. 0x01-0x17: These values are not allowed. 0x84: The device wakes up every 10 ms (0x140 x 31.25 µs) 0x94: The device wakes up every 20 ms (0x280 x 31.25 µs) 0xB9: The device wakes up every 100 ms (0x0C80 x 31.25 µs) 0xDF: The device wakes up every 496 ms (0x3E00 x 31.25 µs) 0xFF: The device wakes up every 1.984 seconds (0xF800 x 31.25 µs) Please refer to “AN498: Si114x Designer’s Guide”, Section 5.4 “Compression Concept.” Rev. 1.41 Si1141/42/43 ALS_RATE @ 0x09 Bit 7 6 5 4 3 Name ALS_RATE Type RW 2 1 0 复位值 = 0000 0000 Bit Name Function 7:0 ALS_RATE ALS_RATE is an 8-bit compressed value representing a 16-bit multiplier. This multiplier, in conjunction with the MEAS_RATE time, represents how often ALS Measurements are made. For a given ALS measurement period, MEAS_RATE should be as high as possible and ALS_RATE as low as possible in order to optimize power consumption. Example Values: 0x00: Autonomous ALS Measurements are not made. 0x08: ALS Measurements made every time the device wakes up. (0x0001 x timeValueOf(MEAS_RATE)) 0x32: ALS Measurements made every 10 times the device wakes up. (0x000A x timeValueOf(MEAS_RATE) 0x69: ALS Measurements made every 100 times the device wakes up. (0x0064 x timeValueOf(MEAS_RATE) Please refer to “AN498: Si114x Designer’s Guide”, Section 5.4 “Compression Concept.” Rev. 1.41 37 Si1141/42/43 PS_RATE @ 0x0A Bit 7 6 5 4 3 Name PS_RATE Type RW 2 1 0 复位值 = 0000 0000 Bit Name Function 7:0 PS_RATE PS_RATE is an 8-bit compressed value representing a 16-bit multiplier. This multiplier, in conjunction with the MEAS_RATE time, represents how often PS Measurements are made. For a given proximity measurement period, MEAS_RATE should be as high as possible and PS_RATE as low as possible in order to optimize power consumption. Example Values: 0x00: Autonomous PS Measurements are not made 0x08: PS Measurements made every time the device wakes up (0x0001 x timeValueOf(MEAS_RATE)) 0x32: PS Measurements made every 10 times the device wakes up (0x000A x timeValueOf(MEAS_RATE) 0x69: PS Measurements made every 100 times the device wakes up (0x0064 x timeValueOf(MEAS_RATE) Please refer to “AN498: Si114x Designer’s Guide”, Section 5.4 “Compression Concept.” ALS_LOW_TH0: ALS_LOW_TH Data Word Low Byte @ 0x0B Bit 7 6 5 4 3 2 Name ALS_LOW_TH[7:0] Type RW 1 0 复位值 = 0000 0000 38 Bit Name Function 7:0 ALS_LOW_TH[7:0] ALS_LOW_TH is a 16-bit threshold value. When used in conjunction with ALS_HI_TH, it forms a window region applied to either ALS_VIS or ALS_IR measurements for interrupting the host. Once autonomous measurements have started, modification to ALS_LOW_TH should be preceded by an ALS_PAUSE or PSALS_PAUSE command. For revisions A10 and below, ALS_LOW_TH uses an 8bit compressed format. Refer to “AN498: Si114x Designer’s Guide”, Section 5.4 “Compression Concept.” Rev. 1.41 Si1141/42/43 ALS_LOW_TH1:ALS_LOW_TH Data Word High Byte @ 0x0C Bit 7 6 5 4 3 2 Name ALS_LOW_TH[15:8] Type RW 1 0 复位值 = 0000 0000 Bit 7:0 Name Function ALS_LOW_TH[15:8] ALS_LOW_TH is a 16-bit threshold value. When used in conjunction with ALS_HI_TH, it forms a window region applied to either ALS_VIS or ALS_IR measurements for interrupting the host. Once autonomous measurements have started, modification to ALS_LOW_TH should be preceded by an ALS_PAUSE or PSALS_PAUSE command. For revisions A10 and below, ALS_LOW_TH uses an 8bit compressed format. Refer to “AN498: Si114x Designer's Guide", Section 5.4 “Compression Concept.” ALS_HI_TH0: ALS_HI_TH Data Word Low Byte @ 0x0D Bit 7 6 5 4 3 Name ALS_HI_TH[7:0] Type RW 2 1 0 复位值 = 0000 0000 Bit 7:0 Name Function ALS_HI_TH[7:0] ALS_HI_TH is a 16-bit threshold value. When used in conjunction with ALS_LOW_TH, it forms a window region applied to either ALS_VIS or ALS_IR measurements for interrupting the host. Once autonomous measurements have started, modification to ALS_HI_TH should be preceded by an ALS_PAUSE or PSALS_PAUSE command. For revisions A10 and below, ALS_HI_TH uses an 8-bit compressed format. Refer to “AN498: Si114x Designer's Guide”, Section 5.4 “Compression Concept.” Note: This register available for sequencer revisions A03 or later. Rev. 1.41 39 Si1141/42/43 ALS_HI_TH1: ALS_HI_TH Data Word High Byte @ 0x0E Bit 7 6 5 4 3 2 Name ALS_HI_TH[15:8] Type RW 1 0 复位值 = 0000 0000 Bit 7:0 Name Function ALS_HI_TH[15:8] ALS_HI_TH is a 16-bit threshold value. When used in conjunction with ALS_LOW_TH, it forms a window region applied to either ALS_VIS or ALS_IR measurements for interrupting the host. Once autonomous measurements have started, modification to ALS_HI_TH should be preceded by an ALS_PAUSE or PSALS_PAUSE command. For revisions A10 and below, ALS_HI_TH uses an 8-bit compressed format. Refer to “AN498: Si114x Designer's Guide” Section 5.4 “Compression Concept.” Note: ‘ PS_LED21 @ 0x0F Bit 7 6 5 4 3 2 1 Name LED2_I LED1_I Type RW RW 0 复位值 = 0000 0000 Bit Name Function 7:4 LED2_I LED2_I Represents the irLED current sunk by the LED2 pin during a PS measurement. On the Si1141, these bits must be set to zero. 3:0 LED1_1 LED1_I Represents the irLED current sunk by the LED1 pin during a PS measurement. LED3_I, LED2_I, and LED1_I current encoded as follows: 0000: No current 0001: Minimum current 1111: Maximum current Refer to ? 4 ??? 2, “Performance Characteristics1,” for LED current values. PS_LED3 @ 0x10 Bit 40 7 6 5 4 3 2 1 Name LED3_I Type RW Rev. 1.41 0 Si1141/42/43 复位值 = 0000 0000 Bit Name 7:4 Reserved 3:0 LED3_I Function Reserved. LED3_I Represents the irLED current sunk by the LED3 pin during a PS measurement. See PS_LED21 Register for additional details. On the Si1141 and Si1142, these bits must be set to zero. PS1_TH0: PS1_TH Data Word Low Byte @ 0x11 Bit 7 6 5 4 3 Name PS1_TH[7:0] Type RW 2 1 0 复位值 = 0000 0000 Bit 7:0 Name Function PS1_TH[7:0] PS1_TH is a 16-bit threshold value. It is compared to PS1 measurements during autonomous operation for interrupting the host. If the threshold register is updated while a measurement is in progress, it is possible that an invalid threshold will be applied if the first new threshold byte has been written and not the second. Remedies include ensuring no measurement during threshold updates and discarding measurements results immediately after threshold updates.Once autonomous measurements have started, modification to PS1_TH should be preceded by a PS_PAUSE or PSALS_PAUSE command. For Si114x revision A10 and below, PS1_TH uses an 8bit compressed format at address 0x11. Refer to “AN498: Si114x Designer's Guide” Section 5.4 “Compression Concept.” PS1_TH1: PS1_TH Data Word High Byte @ 0x12 Bit 7 6 5 4 3 Name PS1_TH[15:8] Type RW 2 1 0 复位值 = 0000 0000 Rev. 1.41 41 Si1141/42/43 Bit 7:0 Name Function PS1_TH[15:8] PS1_TH is a 16-bit threshold value. It is compared to PS1 measurements during autonomous operation for interrupting the host. If the threshold register is updated while a measurement is in progress, it is possible that an invalid threshold will be applied if the first new threshold byte has been written and not the second. Remedies include ensuring no measurement during threshold updates and discarding measurements results immediately after threshold updates. Once autonomous measurements have started, modification to PS1_TH should be preceded by a PS_PAUSE or PSALS_PAUSE command. For Si114x revision A10 and below, PS1_TH uses an 8-bit compressed format at address 0x11. Refer to “AN498: Si114x Designer's Guide” Section 5.4 “Compression Concept.” PS2_TH0: PS2_TH Data Word Low Byte @ 0x13 Bit 7 6 5 4 3 Name PS2_TH[7:0] Type RW 2 1 0 复位值 = 0000 0000 Bit 7:0 Name Function PS2_TH[7:0] PS2_TH is a 16-bit threshold value. It is compared to PS2 measurements during autonomous operation for interrupting the host. If the threshold register is updated while a measurement is in progress, it is possible that an invalid threshold will be applied if the first new threshold byte has been written and not the second. Remedies include ensuring no measurement during threshold updates and discarding measurements results immediately after threshold updates. Once autonomous measurements have started, modification to PS2_TH should be preceded by a PS_PAUSE or PSALS_PAUSE command. For Si114x revision A10 and below, PS2_TH uses an 8bit compressed format at address 0x13. Refer to “AN498: Si114x Designer's Guide” Section 5.4 “Compression Concept.” PS2_TH1: PS2_TH Data Word High Byte @ 0x14 Bit 7 6 5 4 Name PS2_TH[15:8] Type RW 复位值 = 0000 0000 42 3 Rev. 1.41 2 1 0 Si1141/42/43 Bit 7:0 Name Function PS2_TH[15:8] PS2_TH is a 16-bit threshold value. It is compared to PS2 measurements during autonomous operation for interrupting the host. If the threshold register is updated while a measurement is in progress, it is possible that an invalid threshold will be applied if the first new threshold byte has been written and not the second. Remedies include ensuring no measurement during threshold updates and discarding measurements results immediately after threshold updates.Once autonomous measurements have started, modification to PS2_TH should be preceded by a PS_PAUSE or PSALS_PAUSE command. For Si114x revision A10 and below, PS2_TH uses an 8-bit compressed format at address 0x13. Refer to “AN498: Si114x Designer's Guide” Section 5.4 “Compression Concept.” PS3_TH0: PS3_TH Data Word Low Byte @ 0x15 Bit 7 6 5 4 3 Name PS3_TH[7:0] Type RW 2 1 0 复位值 = 0000 0000 Bit Name Function 7:0 PS3_TH[7:0] PS3_TH is a 16-bit threshold value. It is compared to PS3 measurements during autonomous operation for interrupting the host. If the threshold register is updated while a measurement is in progress, it is possible that an invalid threshold will be applied if the first new threshold byte has been written and not the second. Remedies include ensuring no measurement during threshold updates and discarding measurements results immediately after threshold updates.Once autonomous measurements have started, modification to PS3_TH should be preceded by a PS_PAUSE or PSALS_PAUSE command. For Si114x revision A10 and below, PS3_TH uses an 8-bit compressed format at address 0x15. Refer to “AN498: Si114x Designer's Guide” Section 5.4 “Compression Concept.” PS3_TH1: PS3_TH Data Word High Byte @ 0x16 Bit 7 6 5 4 3 Name PS3_TH[15:8] Type RW 2 1 0 复位值 = 0000 0000 Rev. 1.41 43 Si1141/42/43 Bit Name Function 7:0 PS3_TH[15:8] PS3_TH is a 16-bit threshold value. It is compared to PS3 measurements during autonomous operation for interrupting the host. If the threshold register is updated while a measurement is in progress, it is possible that an invalid threshold will be applied if the first new threshold byte has been written and not the second. Remedies include ensuring no measurement during threshold updates and discarding measurements results immediately after threshold updates.Once autonomous measurements have started, modification to PS3_TH should be preceded by a PS_PAUSE or PSALS_PAUSE command. For Si114x revision A10 and below, PS3_TH uses an 8-bit compressed format at address 0x15. Refer to “AN498: Si114x Designer's Guide” Section 5.4 “Compression Concept.” PARAM_WR @ 0x17 Bit 7 6 5 4 3 Name PARAM_WR Type RW 2 1 0 复位值 = 0000 0000 Bit Name 7:0 Function PARAM_WR Mailbox register for passing parameters from the host to the sequencer. COMMAND @ 0x18 Bit 7 6 5 4 3 Name COMMAND Type RW 2 1 0 复位值 = 0000 0000 Bit 7:0 Name Function COMMAND COMMAND Register. The COMMAND Register is the primary mailbox register into the internal sequencer. Writing to the COMMAND register is the only I2C operation that wakes the device from standby mode. 44 Rev. 1.41 Si1141/42/43 RESPONSE @ 0x20 Bit 7 6 5 4 3 Name RESPONSE Type RW 2 1 0 复位值 = 0000 0000 Bit Name Function 7:0 RESPONSE The Response register is used in conjunction with command processing. When an error is encountered, the response register will be loaded with an error code. All error codes will have the MSB is set. The error code is retained until a RESET or NOP command is received by the sequencer. Other commands other than RESET or NOP will be ignored. However, any autonomous operation in progress continues normal operation despite any error. 0x00–0x0F: No Error. Bits 3:0 form an incrementing roll-over counter. The roll over counter in bit 3:0 increments when a command has been executed by the Si114x. Once autonomous measurements have started, the execution timing of any command becomes non-deterministic since a measurement could be in progress when the COMMAND register is written. The host software must make use of the rollover counter to ensure that commands are processed. 0x80: Invalid Command Encountered during command processing 0x88: ADC Overflow encountered during PS1 measurement 0x89: ADC Overflow encountered during PS2 measurement 0x8A: ADC Overflow encountered during PS3 measurement 0x8C: ADC Overflow encountered during ALS-VIS measurement 0x8D: ADC Overflow encountered during ALS-IR measurement 0x8E: ADC Overflow encountered during AUX measurement IRQ_STATUS @ 0x21 Bit 7 6 5 4 3 2 Name CMD_INT PS3_INT PS2_INT PS1_INT ALS_INT Type RW RW RW RW RW Rev. 1.41 1 0 45 Si1141/42/43 复位值 = 0000 0000 Bit Name Function 7:6 Reserved Reserved. 5 CMD_INT Command Interrupt Status. 4 PS3_INT PS3 Interrupt Status. 3 PS2_INT PS3 Interrupt Status. 2 PS1_INT PS1 Interrupt Status. 1:0 ALS_INT ALS Interrupt Status. (Refer to Table 13 for encoding.) Notes: 1. If the corresponding IRQ_ENABLE bit is also set when the IRQ_STATUS bit is set, the INT pin is asserted. 2. When INT_MODE = 0, the host must write '1' to the corresponding XXX_INT bit to clear the interrupt. 3. When INT_MODE = 1, the internal sequencer clears all the XXX_INT bits (and INT pin) automatically unless used with PS (Parameter Field PSx_IM = 11). Use of INT_MODE = 0 is recommended. ALS_VIS_DATA0: ALS_VIS_DATA Data Word Low Byte @ 0x22 Bit 7 6 5 4 3 2 Name ALS_VIS_DATA[7:0] Type RW 1 0 复位值 = 0000 0000 Bit Name 7:0 Function ALS_VIS_DATA[7:0] ALS VIS Data LSB. Once autonomous measurements have started, this register must be read after INT has asserted but before the next measurement is made. Refer to “AN498: Si114x Designer’s Guide” Section 5.6.2 “Host Interrupt Latency.” ALS_VIS_DATA1: ALS_VIS_DATA Data Word High Byte @ 0x23 Bit 7 6 5 4 3 Name ALS_VIS_DATA[15:8] Type RW 2 1 0 复位值 = 0000 0000 Bit 7:0 46 Name Function ALS_VIS_DATA[15:8] ALS VIS Data MSB. Once autonomous measurements have started, this register must be read after INT has asserted but before the next measurement is made. Refer to “AN498: Si114x Designer’s Guide” Section 5.6.2 “Host Interrupt Latency.” Rev. 1.41 Si1141/42/43 ALS_IR_DATA0: ALS_IR_DATA Data Word Low Byte@ 0x24 Bit 7 6 5 4 3 Name ALS_IR_DATA[7:0] Type RW 2 1 0 复位值 = 0000 0000 Bit 7:0 Name Function ALS_IR_DATA[7:0] ALS IR Data LSB. Once autonomous measurements have started, this register must be read after INT has asserted but before the next measurement is made. Refer to “AN498: Si114x Designer’s Guide” Section 5.6.2 “Host Interrupt Latency.” ALS_IR_DATA1: ALS_IR_DATA Data Word High Byte @ 0x25 Bit 7 6 5 4 3 Name ALS_IR_DATA[15:8] Type RW 2 1 0 复位值 = 0000 0000 Bit 7:0 Name Function ALS_IR_DATA[15:8] ALS IR Data MSB. Once autonomous measurements have started, this register must be read after INT has asserted but before the next measurement is made. Refer to “AN498: Si114x Designer’s Guide” Section 5.6.2 “Host Interrupt Latency.” PS1_DATA0: PS1_DATA Data Word Low Byte @ 0x26 Bit 7 6 5 4 3 Name PS1_DATA[7:0] Type RW 2 1 0 复位值 = 0000 0000 Bit 7:0 Name Function PS1_DATA[7:0] PS1 Data LSB. Once autonomous measurements have started, this register must be read after INT has asserted but before the next measurement is made. Refer to “AN498: Si114x Designer’s Guide” Section 5.6.2 “Host Interrupt Latency.” Rev. 1.41 47 Si1141/42/43 PS1_DATA1: PS1_DATA Data Word High Byte @ 0x27 Bit 7 6 5 4 3 Name PS1_DATA[15:8] Type RW 2 1 0 复位值 = 0000 0000 Bit 7:0 Name Function PS1_DATA[15:8] PS1 Data MSB. Once autonomous measurements have started, this register must be read after INT has asserted but before the next measurement is made. Refer to “AN498: Si114x Designer’s Guide” Section 5.6.2 “Host Interrupt Latency.” PS2_DATA0: PS2_DATA Data Word Low Byte @ 0x28 Bit 7 6 5 4 3 Name PS2_DATA[7:0] Type RW 2 1 0 复位值 = 0000 0000 Bit 7:0 Name Function PS2_DATA[7:0] PS2 Data LSB. Once autonomous measurements have started, this register must be read after INT has asserted but before the next measurement is made. Refer to “AN498: Si114x Designer’s Guide” Section 5.6.2 “Host Interrupt Latency.” PS2_DATA1: PS2_DATA Data Word High Byte @ 0x29 Bit 7 6 5 4 3 Name PS2_DATA[15:8] Type RW 2 1 0 复位值 = 0000 0000 Bit 7:0 48 Name Function PS2_DATA[15:8] PS2 Data MSB. Once autonomous measurements have started, this register must be read after INT has asserted but before the next measurement is made. Refer to “AN498: Si114x Designer’s Guide” Section 5.6.2 “Host Interrupt Latency.” Rev. 1.41 Si1141/42/43 PS3_DATA0: PS3_DATA Data Word Low Byte @ 0x2A Bit 7 6 5 4 3 Name PS3_DATA[7:0] Type RW 2 1 0 复位值 = 0000 0000 Bit Name 7:0 Function PS3_DATA[7:0] PS3 Data LSB. Once autonomous measurements have started, this register must be read after INT has asserted but before the next measurement is made. Refer to “AN498: Si114x Designer’s Guide” Section 5.6.2 “Host Interrupt Latency.” PS3_DATA1: PS3_DATA Data Word High Byte @ 0x2B Bit 7 6 5 4 3 Name PS3_DATA[15:8] Type RW 2 1 0 复位值 = 0000 0000 Bit 7:0 Name Function PS3_DATA[15:8] PS3 Data MSB. Once autonomous measurements have started, this register must be read after INT has asserted but before the next measurement is made. Refer to “AN498: Si114x Designer’s Guide” Section 5.6.2 “Host Interrupt Latency.” AUX_DATA0: AUX_DATA Data Word Low Byte @ 0x2C Bit 7 6 5 4 3 Name AUX_DATA[7:0] Type RW 2 1 0 复位值 = 0000 0000 Bit 7:0 Name Function AUX_DATA[7:0] AUX Data LSB. Once autonomous measurements have started, this register must be read after INT has asserted but before the next measurement is made. Refer to “AN498: Si114x Designer’s Guide” Section 5.6.2 “Host Interrupt Latency.” Rev. 1.41 49 Si1141/42/43 AUX_DATA1: AUX_DATA Data Word High Byte @ 0x2D Bit 7 6 5 4 3 Name AUX_DATA[15:8] Type RW 2 1 0 复位值 = 0000 0000 Bit 7:0 Name Function AUX_DATA[15:8] AUX Data MSB. Once autonomous measurements have started, this register must be read after INT has asserted but before the next measurement is made. Refer to “AN498: Si114x Designer’s Guide” Section 5.6.2 “Host Interrupt Latency.” PARAM_RD @ 0x2E Bit 7 6 5 4 3 Name PARAM_RD Type RW 2 1 0 复位值 = 0000 0000 Bit Name 7:0 PARAM_RD Function Mailbox register for passing parameters from the sequencer to the host. CHIP_STAT @ 0x30 Bit 7 6 5 4 3 2 1 0 Name RUNNING SUSPEND SLEEP Type R R R 复位值 = 0000 0000 50 Bit Name Function 7:3 Reserved Reserved 2 RUNNING Device is awake. 1 SUSPEND Device is in a low-power state, waiting for a measurement to complete. 0 SLEEP Device is in its lowest power state. Rev. 1.41 Si1141/42/43 ANA_IN_KEY @ 0x3B to 0x3E Bit 7 6 5 4 3 2 0x3B ANA_IN_KEY[31:24] 0x3C ANA_IN_KEY[23:16] 0x3D ANA_IN_KEY[15:8] 0x3E ANA_IN_KEY[7:0] Type RW 1 0 复位值 = 0000 0000 Bit Name 31:0 ANA_IN_KEY[31:0] Function Reserved. Rev. 1.41 51 Si1141/42/43 4.6. 参数 RAM 参数在内存中,不可直接通过 I2C 解址。他们必须直接使用 PARAM_QUERY 和 PARAM_SET 命令解址,详见 第 20 页上 “4.2. 命令协议 ”。 Table 16. Parameter RAM Summary Table Parameter Name Offset I2C_ADDR 0x00 CHLIST 0x01 — EN_AUX EN_ALS_IR EN_ALS_ VIS — PSLED12_SELECT 0x02 — PS2_LED — PSLED3_SELECT 0x03 Reserved 0x04 PS_ENCODING 0x05 ALS_ENCODING 0x06 PS1_ADCMUX 0x07 PS1 ADC Input Selection PS2_ADCMUX 0x08 PS2 ADC Input Selection PS3_ADCMUX 0x09 PS3 ADC Input Selection PS_ADC_COUNTER 0x0A PS_ADC_GAIN 0x0B PS_ADC_MISC 0x0C Reserved 0x0D Reserved (do not modify from default setting of 0x02) ALS_IR_ADCMUX 0x0E ALS_IR_ADCMUX AUX_ADCMUX 0x0F AUX ADC Input Selection ALS_VIS_ADC_COUNTER 0x10 ALS_VIS_ADC_GAIN 0x11 ALS_VIS_ADC_MISC 0x12 Reserved 0x13 Reserved (do not modify from default setting of 0x40) Reserved 0x14– 0x15 Reserved (do not modify from default setting of 0x00) ALS_HYST 0x16 ALS Hysteresis PS_HYST 0x17 PS Hysteresis PS_HISTORY 0x18 PS History Setting ALS_HISTORY 0x19 ALS History Setting 52 Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 I2C Address EN_PS3 EN_PS EN_P 2 S1 PS1_LED — PS3_LED Reserved (always set to 0) — PS3_ALI PS2_ALIGN PS1_ALIG GN N — Reserved (always set to 0) ALS_IR_ALI ALS_VIS_ GN ALIGN — Reserved (always set to 0) PS_ADC_REC Reserved (always set to 0) — — PS_ADC_GAIN PS_RANGE — — PS_ADC_MODE VIS_ADC_REC Reserved (always set to 0) — Reserved (always set to 0) VIS_RANG E Rev. 1.41 — ALS_VIS_ADC_GAIN Reserved (always set to 0) Si1141/42/43 Table 16. Parameter RAM Summary Table (Continued) Parameter Name Offset Bit 7 Bit 6 Bit 5 ADC_OFFSET 0x1A ADC Offset Reserved 0x1B Reserved (do not modify from default setting of 0x00) LED_REC 0x1C LED recovery time ALS_IR_ADC_COUNTER 0x1D ALS_IR_ADC_GAIN 0x1E ALS_IR_ADC_MISC 0x1F — Bit 4 Bit 3 IR_ADC_REC Bit 2 Bit 0 Reserved (always set to 0) — Reserved (always set to 0) Bit 1 ALS_IR_ADC_GAIN IR_RANGE Reserved (always set to 0) I2C @ 0x00 Bit 7 6 5 4 3 2 1 0 2 Name I C Address[7:0] Type RW 复位值 = 0000 0000 Bit 7:0 Name I2C Function I 2C Address[7:0] Specifies a new Address for the device to respond to. The new address takes effect when a BUSADDR command is received. CHLIST @ 0x01 Bit 7 Name 6 EN_AUX Type 5 4 3 EN_ALS_IR EN_ALS_VIS RW 2 1 0 EN_PS3 EN_PS2 EN_PS1 RW 复位值 = 0000 0000 Bit Name 7 Reserved 6 EN_AUX 5 EN_ALS_IR 4 Function Enables Auxiliary Channel, data stored in AUX_DATA1[7:0] and AUX_DATA0[7:0]. Enables ALS IR Channel, data stored in ALS_IR_DATA1[7:0] and ALS_IR_DATA0[7:0]. EN_ALS_VIS Enables ALS Visible Channel, data stored in ALS_VIS_DATA1[7:0] and ALS_VIS_DATA0[7:0]. 3 Reserved 2 EN_PS3 Enables PS Channel 3, data stored in PS3_DATA1[7:0] and PS3_DATA0[7:0]. Rev. 1.41 53 Si1141/42/43 1 EN_PS2 Enables PS Channel 2, data stored in PS2_DATA1[7:0] and PS2_DATA0[7:0]. 0 EN_PS1 Enables PS Channel 1, data stored in PS1_DATA1[7:0] and PS1_DATA0[7:0]. Note: For proper operation, CHLIST must be written with a non-zero value before forced measurements or autonomous operation is requested. PSLED12_SELECT @ 0x02 Bit 7 6 5 4 3 2 1 Name PS2_LED[2:0] PS1_LED[2:0] Type RW RW 0 复位值 = 0010 0001 Bit Name 7 Reserved 6:4 PS2_LED[2:0] 3 Reserved 2:0 PS1_LED[2:0] Function Specifies the LED pin driven during the PS2 Measurement. Note that any combination of irLEDs is possible. 000: NO LED DRIVE xx1: LED1 Drive Enabled x1x: LED2 Drive Enabled (Si1142 and Si1143 only. Clear for Si1141) 1xx: LED3 Drive Enabled (Si1143 only. Clear for Si1141 and Si1142) Specifies the LED pin driven during the PS1 Measurement. Note that any combination of irLEDs is possible. 000: NO LED DRIVE xx1: LED1 Drive Enabled x1x: LED2 Drive Enabled (Si1142 and Si1143 only. Clear for Si1141) 1xx: LED3 Drive Enabled (Si1143 only. Clear for Si1141 and Si1142) PSLED3_SELECT @ 0x03 Bit 7 6 5 4 2 1 Name PS3_LED[2:0] Type RW 复位值 = 0000 0100 54 3 Rev. 1.41 0 Si1141/42/43 Bit Name 7:3 Reserved 2:0 Function PS3_LED[2:0] Specifies the LED pin driven during the PS3 Measurement. Note that any combination of irLEDs is possible. 000: No LED drive. xx1: LED1 drive enabled. x1x: LED2 drive enabled (Si1142 and Si1143 only. Clear for Si1141). 1xx: LED3 drive enabled (Si1143 only. Clear for Si1141 and Si1142). PS_ENCODING @ 0x05 Bit 7 6 Name 5 4 3 2 1 0 PS3_ALIGN PS2_ALIGN PS1_ALIGN Type RW R/W R/W 复位值 = 0000 0000 Bit Name Function 7 Reserved 6 PS3_ALIGN When set, the ADC reports the least significant 16 bits of the 17-bit ADC when performing PS3 Measurement. Reports the 16 MSBs when cleared. 5 PS2_ALIGN When set, the ADC reports the least significant 16 bits of the 17-bit ADC when performing PS2 Measurement. Reports the 16 MSBs when cleared. 4 PS1_ALIGN When set, the ADC reports the least significant 16 bits of the 17-bit ADC when performing PS1 Measurement. Reports the 16 MSBs when cleared. 3:0 Reserved Always set to 0. ALS_ENCODING @ 0x06 Bit 7 6 Name 5 4 3 2 1 0 ALS_IR_ALIGN ALS_VIS_ALIGN Type RW RW 复位值 = 0000 0000 Bit Name 7:6 Reserved 5 ALS_IR_ALIGN Function When set, the ADC reports the least significant 16 bits of the 17-bit ADC when performing ALS VIS Measurement. Reports the 16 MSBs when cleared. Rev. 1.41 55 Si1141/42/43 4 3:0 ALS_VIS_ALIGN When set, the ADC reports the least significant 16 bits of the 17-bit ADC when performing ALS IR Measurement. Reports the 16 MSBs when cleared. Reserved Always set to 0. PS1_ADCMUX @ 0x07 Bit 7 6 5 4 3 Name PS1_ADCMUX[7:0] Type RW 2 1 0 复位值 = 0000 0011 Bit 7:0 Name Function PS1_ADCMUX[7:0] Selects ADC Input for PS1 Measurement. The following selections are valid when PS_ADC_MODE = 1 (default). This setting is for normal Proximity Detection function. 0x03: Large IR Photodiode 0x00: Small IR Photodiode In addition, the following selections are valid for PS_ADC_MODE = 0. With this setting, irLED drives are disabled and the PS channels are no longer operating in normal Proximity Detection function. The results have no reference and the references needs to be measured in a separate measurement. 0x02: Visible Photodiode A separate 'No Photodiode' measurement should be subtracted from this reading. Note that the result is a negative value. The result should therefore be negated to arrive at the Ambient Visible Light reading. 0x03: Large IR Photodiode A separate “No Photodiode” measurement should be subtracted to arrive at Ambient IR reading. 0x00: Small IR Photodiode A separate “No Photodiode” measurement should be subtracted to arrive at Ambient IR reading. 0x06: No Photodiode This is typically used as reference for reading ambient IR or visible light. 0x25: GND voltage This is typically used as the reference for electrical measurements. 0x65: Temperature (Should be used only for relative temperature measurement. Absolute Temperature not guaranteed) A separate GND measurement should be subtracted from this reading. 0x75: VDD voltage A separate GND measurement is needed to make the measurement meaningful. 56 Rev. 1.41 Si1141/42/43 PS2_ADCMUX @ 0x08 Bit 7 6 5 4 3 Name PS2_ADCMUX[7:0] Type R/W 2 1 0 复位值 = 0000 0011 Bit 7:0 Name Function PS2_ADCMUX[7:0] Selects input for PS2 measurement. See PS1_ADCMUX register description for details. PS3_ADCMUX @ 0x09 Bit 7 6 5 4 3 Name PS3_ADCMUX[7:0] Type R/W 2 1 0 复位值 = 0000 0011 Bit 7:0 Name Function PS3_ADCMUX[7:0] Selects input for PS3 measurement. See PS1_ADCMUX register description for details. PS_ADC_COUNTER @ 0x0A Bit 7 6 Name Type 5 4 3 2 1 0 PS_ADC_REC[2:0] RW R/W R/W 复位值 = 0111 0000 Rev. 1.41 57 Si1141/42/43 Bit Name 7 Reserved 6:4 3:0 Function PS_ADC_REC[2:0] Recovery period the ADC takes before making a PS measurement. 000: 1 ADC Clock (50 ns times 2PS_ADC_GAIN) 001: 7 ADC Clock (350 ns times 2PS_ADC_GAIN) 010: 15 ADC Clock (750 ns times 2PS_ADC_GAIN) 011: 31 ADC Clock (1.55 µs times 2PS_ADC_GAIN) 100: 63 ADC Clock (3.15 µs times 2PS_ADC_GAIN) 101: 127 ADC Clock (6.35 µs times 2PS_ADC_GAIN) 110: 255 ADC Clock (12.75 µs times 2PS_ADC_GAIN) 111: 511 ADC Clock (25.55 µs times 2PS_ADC_GAIN) The recommended PS_ADC_REC value is the one’s complement of PS_ADC_GAIN. Reserved Always set to 0. PS_ADC_GAIN @ 0x0B Bit 7 6 5 4 3 2 Name 1 0 PS_ADC_GAIN[2:0] Type R/W R/W R/W 复位值 = 0000 0000 58 Bit Name 7:3 Reserved 2:0 PS_ADC_GAIN[2:0] Function Increases the irLED pulse width and ADC integration time by a factor of (2 ^ PS_ADC_GAIN) for all PS measurements. Care must be taken when using this feature. At an extreme case, each of the three PS measurements can be configured to drive three separate irLEDs, each of which, are configured for 359 mA. The internal sequencer does not protect the device from such an error. To prevent permanent damage to the device, do not enter any value greater than 5 without consulting with Silicon Labs. For Example: 0x0: ADC Clock is divided by 1 0x4: ADC Clock is divided by 16 0x5: ADC Clock is divided by 32 Rev. 1.41 Si1141/42/43 PS_ADC_MISC @ 0x0C Bit 7 6 5 4 3 2 Name PS_RANGE PS_ADC_MODE Type RW RW 1 0 复位值 = 0000 0100 Bit Name 7:6 Reserved 5 PS_RANGE 4:3 Reserved 2 1:0 Function When performing PS measurements, the ADC can be programmed to operate in high sensitivity operation or high signal range. The high signal range is useful in operation under direct sunlight. 0: Normal Signal Range 1: High Signal Range (Gain divided by 14.5) PS_ADC_MODE PS Channels can either operate normally as PS channels, or it can be used to perform raw ADC measurements: 0: Raw ADC Measurement Mode 1: Normal Proximity Measurement Mode Reserved ALS_IR_ADCMUX @ 0x0E Bit 7 6 5 4 3 Name ALS_IR_ADCMUX Type RW 2 1 0 复位值 = 0000 0000 Bit Name 7:0 ALS_IR_ADCMUX Function Selects ADC Input for ALS_IR Measurement. 0x00: Small IR photodiode 0x03: Large IR photodiode Rev. 1.41 59 Si1141/42/43 AUX_ADCMUX @ 0x0F Bit 7 6 5 4 3 Name AUX_ADCMUX[7:0] Type RW 2 1 0 复位值 = 0110 0101 Bit 7:0 Name Function AUX_ADCMUX[7:0] Selects input for AUX Measurement. These measurements are referenced to GND. 0x65: Temperature (Should be used only for relative temperature measurement. Absolute Temperature not guaranteed) 0x75: VDD voltage ALS_VIS_ADC_COUNTER @ 0x10 Bit 7 6 5 Name 4 3 2 1 0 VIS_ADC_REC[2:0] Type RW R/W R/W 复位值 = 0111 0000 Bit Name 7 Reserved 6:4 VIS_ADC_REC[2:0] 3:0 Reserved Function Recovery period the ADC takes before making a ALS-VIS measurement. 000: 1 ADC Clock (50 ns times 2ALS_VIS_ADC_GAIN) 001: 7 ADC Clock (350 ns times 2ALS_VIS_ADC_GAIN) 010: 15 ADC Clock (750 ns times 2ALS_VIS_ADC_GAIN) 011: 31 ADC Clock (1.55 µs times 2ALS_VIS_ADC_GAIN) 100: 63 ADC Clock (3.15 µs times 2ALS_VIS_ADC_GAIN) 101: 127 ADC Clock (6.35 µs times 2ALS_VIS_ADC_GAIN) 110: 255 ADC Clock (12.75 µs times 2ALS_VIS_ADC_GAIN) 111: 511 ADC Clock (25.55 µs times 2ALS_VIS_ADC_GAIN) The recommended VIS_ADC_REC value is the one’s complement of ALS_VIS_ADC_GAIN. Always set to 0. Note: For A02 and earlier, this parameter also controls ALS-IR measurements. 60 Rev. 1.41 Si1141/42/43 ALS_VIS_ADC_GAIN @ 0x11 Bit 7 6 5 4 3 2 Name 1 0 ALS_VIS_ADC_GAIN[2:0] Type RW R/W RW 复位值 = 0000 0000 Bit Name 7:3 Reserved 2:0 Function ALS_VIS_ADC_GAIN[2:0] Increases the ADC integration time for ALS Visible measurements by a factor of (2 ^ ALS_VIS_ADC_GAIN). This allows visible light measurement under dark glass. The maximum gain is 128 (0x7). For Example: 0x0: ADC Clock is divided by 1 0x4: ADC Clock is divided by 16 0x6: ADC Clock is divided by 64 Note: For A02 and earlier, this parameter also controls ALS-IR measurements. ALS_VIS_ADC_MISC @ 0x12 Bit 7 6 5 Name VIS_RANGE Type RW 4 3 2 1 0 复位值 = 0000 0000 Bit Name 7:6 Reserved 5 4:0 Function VIS_RANGE When performing ALS-VIS measurements, the ADC can be programmed to operate in high sensitivity operation or high signal range. The high signal range is useful in operation under direct sunlight. 0: Normal Signal Range 1: High Signal Range (Gain divided by 14.5) Reserved Note: For A02 and earlier, this parameter also controls ALS-IR measurements. Rev. 1.41 61 Si1141/42/43 ALS_HYST @ 0x16 Bit 7 6 5 4 3 Name ALS_HYST[7:0] Type RW 2 1 0 复位值 = 0100 1000 Bit 7:0 Name Function ALS_HYST[7:0] ALS_HYST represents a hysteresis applied to the ALS_LOW_TH and ALS_HIGH_TH thresholds. This is in an 8-bit compressed format, representing a 16-bit value. For example: 0x48: 24 ADC Codes Please refer to “AN498: Si114x Designer’s Guide”, Section 5.4 “Compression Concept.” PS_HYST @ 0x17 Bit 7 6 5 4 3 Name PS_HYST[7:0] Type RW 2 1 0 复位值 = 0100 1000 Bit 7:0 62 Name Function PS_HYST[7:0] PS_HYST represents a hysteresis applied to the PS1_TH, PS2_TH and PS3_TH thresholds. This is in an 8-bit compressed format, representing a 16-bit value. For example: 0x48: 24 ADC Codes. Please refer to “AN498: Si114x Designer’s Guide”, Section 5.4 “Compression Concept.” Rev. 1.41 Si1141/42/43 PS_HISTORY @ 0x18 Bit 7 6 5 4 3 2 Name PS_HISTORY[7:0] Type RW 1 0 复位值 = 0000 0011 Bit 7:0 Name Function PS_HISTORY[7:0] PS_HISTORY is a bit-field representing the number of consecutive samples exceeding the threshold and hysteresis to change status. For example: 0x03: 2 consecutive samples 0x07: 3 consecutive samples 0xFF: 8 consecutive samples ALS_HISTORY @ 0x19 Bit 7 6 5 4 3 2 Name ALS_HISTORY[7:0] Type RW 1 0 复位值 = 0000 0011 Bit 7:0 Name Function ALS_HISTORY[7:0] ALS_HISTORY is a bit-field representing the number of consecutive samples exceeding the threshold and hysteresis to change status. For example: 0x03: Two consecutive samples 0x07: Three consecutive samples 0xFF: Eight consecutive samples ADC_OFFSET @ 0x1A Bit 7 6 5 4 3 Name ADC_OFFSET[7:0] Type RW 2 1 0 复位值 = 1000 0000 Rev. 1.41 63 Si1141/42/43 Bit 7:0 Name Function ADC_OFFSET[7:0] ADC_OFFSET is an 8-bit compressed value representing a 16-bit value added to all measurements. Since most measurements are relative measurements involving a arithmetic subtraction and can result in a negative value. Since 0xFFFF is treated as an overrange indicator, the ADC_OFFSET is added so that the values reported in the I2C register map are never confused with the 0xFFFF overrange indicator. For example: 0x60: Measurements have a 64-code offset 0x70: Measurements have a 128-code offset 0x80: Measurements have a 256-code offset Please refer to “AN498: Si114x Designer’s Guide”, Section 5.4 “Compression Concept.” LED_REC @ 0x1C Bit 7 6 5 4 3 Name LED_REC[7:0] Type RW 2 1 0 2 1 0 复位值 = 0000 0000 Bit 7:0 Name Function LED_REC[7:0] Reserved. ALS_IR_ADC_COUNTER @ 0x1D Bit 7 6 5 4 Name IR_ADC_REC[2:0] Type RW 复位值 = 0111 0000 64 Rev. 1.41 3 Si1141/42/43 Bit Name Function 7 Reserved 6:4 IR_ADC_REC[2:0] 3:0 Reserved Recovery period the ADC takes before making a ALS-IR measurement. 000: 1 ADC Clock (50 ns times 2ALS_IR_ADC_GAIN) 001: 7 ADC Clock (350 ns times 2ALS_IR_ADC_GAIN) 010: 15 ADC Clock (750 ns times 2ALS_IR_ADC_GAIN) 011: 31 ADC Clock (1.55 µs times 2ALS_IR_ADC_GAIN) 100: 63 ADC Clock (3.15 µs times 2ALS_IR_ADC_GAIN) 101: 127 ADC Clock (6.35 µs times 2ALS_IR_ADC_GAIN) 110: 255 ADC Clock (12.75 µs times 2ALS_IR_ADC_GAIN) 111: 511 ADC Clock (25.55 µs times 2ALS_IR_ADC_GAIN) The recommended IR_ADC_REC value is the one’s complement of ALS_IR_ADC_GAIN. Always set to 0. Note: This parameter available for sequencer revisions A03 or later. ALS_IR_ADC_GAIN @ 0x1E Bit 7 6 5 4 3 2 Name 1 0 ALS_IR_ADC_GAIN[2:0] Type R/W R/W R/W 复位值 = 0000 0000 Bit Name 7:3 Reserved 2:0 Function ALS_IR_ADC_GAIN[2:0] Increases the ADC integration time for IR Ambient measurements by a factor of (2 ^ ALS_IR_ADC_GAIN). The maximum gain is 128 (0x7). For Example: 0x0: ADC Clock is divided by 1 0x4: ADC Clock is divided by 16 0x6: ADC Clock is divided by 64 Note: This parameter available for sequencer revisions A03 or later. ALS_IR_ADC_MISC @ 0x1F Bit 7 6 5 Name IR_RANGE Type RW 4 3 2 1 0 复位值 = 0000 0000 Rev. 1.41 65 Si1141/42/43 Bit Name 7:6 Reserved 5 4:0 Function IR_RANGE When performing ALS-IR measurements, the ADC can be programmed to operate in high sensitivity operation or high signal range. The high signal range is useful in operation under direct sunlight. 0: Normal Signal Range 1: High Signal Range (Gain divided by 14.5) Reserved Write operations to this RAM parameter must preserve this bit-field value using read-modify-write. Note: This parameter is available for sequencer revisions A03 or later. 66 Rev. 1.41 Si1141/42/43 5. 引脚说明 DNC SDA 1 SCL 2 VDD 3 INT 4 10 QFN-10 5 9 LED1 8 GND 7 LED3 6 LED2 DNC Table 17. Pin Descriptions Pin Name Type Description 1 SDA 2 SCL Input 3 VDD Power 4 INT 5 DNC 6 LED2/CVDD1 Output LED2 Output/Connect to VDD.1 Programmable constant current sink normally connected to an infrared LED cathode. Connect directly to VDD when not in use. 7 LED3/CVDD2 Output LED3 Output./Connect to VDD.2 Programmable constant current sink normally connected to an infrared LED cathode. If VLED < (VDD + 0.5 V), a 47 k pull-up resistor from LED3 to VDD is needed for proper operation. Connect directly to VDD when not in use. 8 GND Power Ground. Reference voltage. 9 LED1 Output LED1 Output. Programmable constant current sink normally connected to an infrared LED cathode. 10 DNC Bidirectional I2C Data. I2C Clock. Power Supply. Voltage source. Bidirectional Interrupt Output. Open-drain interrupt output pin. Must be at logic level high during powerup sequence to enable low power operation. Do Not Connect. This pin is electrically connected to an internal Si1141/42/43 node. It should remain unconnected. Do Not Connect. This pin is electrically connected to an internal Si1141/42/43 node. It should remain unconnected. Notes: 1. Si1142 and Si1143 only. Must connect to VDD in Si1141. 2. Si1143 only. Must connect to VDD in Si1141 and Si1142. Rev. 1.41 67 Si1141/42/43 6. 订购指南 Part Number Package LED Drivers AEC-Q100 Si1141-A11-GMR QFN-10 1 N Si1142-A11-GMR QFN-10 2 N Si1143-A11-GMR QFN-10 3 N Si1141-A11-YM0R QFN-10 1 Y Si1142-A11-YM0R QFN-10 2 Y Si1143-A11-YM0R QFN-10 3 Y Si1141-A10-GMR* QFN-10 1 N Si1142-A10-GMR* QFN-10 2 N Si1143-A10-GMR* QFN-10 3 N *Note: Not recommended for new designs. 68 Rev. 1.41 Si1141/42/43 7. 包装外形: 10 引脚 QFN Figure 15 说明 Si1141/42/43 QFN 包装的包装详细信息。表 18 列出插图中尺寸的值。 Top View Pin 1 Indication Figure 15. QFN Package Diagram Dimensions Table 18. Package Diagram Dimensions Dimension Min Nom Max A 0.55 0.65 0.75 b 0.20 0.25 0.30 D 2.00 BSC. e 0.50 BSC. E 2.00 BSC. L 0.30 0.35 aaa 0.10 bbb 0.10 ccc 0.08 ddd 0.10 0.40 Notes: 1. All dimensions shown are in millimeters (mm). 2. Dimensioning and Tolerancing per ANSI Y14.5M-1994. Rev. 1.41 69 Si1141/42/43 Pin 1 0.115 die offset to package 0.66 0.12 0.65 0.16 Small IR photodiode and visible photodiode (stacked) 0.415 Large IR photodiode 0.14 Figure 16. Photodiode Centers 70 Rev. 1.41 Si1141/42/43 8. 建议的 PCB 焊盘图案 Rev. 1.41 71 Si1141/42/43 Dimension mm C1 1.90 C2 1.90 E 0.50 X 0.30 Y 0.80 Notes: General 1. All dimensions shown are in millimeters (mm). 2. This Land Pattern Design is based on the IPC-7351 guidelines. 3. All dimensions shown are at Maximum Material Condition (MMC). Least Material Condition (LMC) is calculated based on a Fabrication Allowance of 0.05 mm. Solder Mask Design 4. All metal pads are to be non-solder mask defined (NSMD). Clearance between the solder mask and the metal pad is to be 60 mm minimum, all the way around the pad. Stencil Design 5. A stainless steel, laser-cut and electro-polished stencil with trapezoidal walls should be used to assure good solder paste release. 6. The stencil thickness should be 0.125 mm (5 mils). 7. The ratio of stencil aperture to land pad size should be 1:1 for all pads. Card Assembly 8. A No-Clean, Type-3 solder paste is recommended. 9. The recommended card reflow profile is per the JEDEC/IPC J-STD-020D specification for Small Body Components. 72 Rev. 1.41 Si1141/42/43 文档更改列表 修订版 0.2 至修订版 0.3 已更新 “ 说明 ” 。 已更新 “5. 引脚说明 ” 。 已更新 “6. 订购指南 ” 。 已将文档标题从 Si1140 更新为 Si114x。 已更新 “7. 包装外形: 10 引脚 QFN” 。 已更新第 69 页上 “7. 包装外形: 10 引脚 QFN”。 已删除第 7.1 节。 已更新表 4、 1 和 2。 已删除第 7.2 节。 已增加图 1、 2 和 4。 已增加寄存器映射和说明。 修订版 0.5 至修订版 1.0 已将文档标题从 Si114x 更新为 Si1143。 已更新应用章节 在标题页做出了照明度范围和其他细微更改。 为三个光电二极管增加了敏感度数据。 为三个光电二极管增加了失调漂移数据。 已将启动时间更新到 25 ms。 已更新表 2 和 3。 已更新图 1、图 4。 已更新表 8、表 9。 修订版 0.3 至修订版 0.4 对位字段定义做出了细微更正。 解释了波纹电压建议。 已增加 MM 和 CDM ESD 额定值。 已更新引脚分配。 已更新寄存器映射和说明。 已解释备用模式 ldd。 已解释 LED 输出泄漏电流。 修订版 0.4 至修订版 0.41 已增加 LED 有功电流的限值。 订购代码更新。 除 Si1143 之外,已增加 Si1141 和 Si1142。 已增加 ODFN-8 包装选项。 重新排列了一些章节。 已增加信号通路软件模型图。 已将 PARAM_IN 重命名为 PARAM_WR 以便更清 楚。 已将 PARAM_OUT 重命名为 PARAM_RD 以便更清 楚。 已将 PS_ADC_CLKDIV 重命名为 PS_ADC_GAIN 以 便更清楚。 已将 ALS_VIS_ADC_CLKDIV 重命名为 ALS_VIS_ADC_GAIN 以便更清楚。 已将 ALS_IR_ADC_CLKDIV 重命名为 ALS_IR_ADC_GAIN 以便更清楚。 对寄存器和参数术语做出了细微更改。 修订版 1.0 至修订版 1.1 已更正 PS_ADC_COUNTER 的复位状态。 对信号通路设定模型图做出了细微更正。 已将 ALS_IR_ADCMUX 的访问模式从寄存器空间更 正为参数空间。 修订版 1.1 至修订版 1.2 已更正 PS_ADC_COUNTER 的复位状态。 新增了 INT、 SCL 和 SDA 引脚的泄漏规格。 将临近阈值寄存器的格式从压缩更改为未压缩。 将固件修订版本从 A10 更改为 A11。 新增了有关压缩模式详细信息的 AN498 参考。 阐明了 PS_ADC_REC、 VIS_ADC_REC 和 IR_ADC_REC 中规定的恢复时间。 修订版 0.41 至修订版 0.5 建议了 PCB 焊盘图案。 已更新表 1、 4、 2 和 15。 已更新 Figure 1。 已增加图 2 和 16。 已更新寄存器表复位值。 已增加 “ HW_KEY @ 0x07” 寄存器。 已更新 “ALS_VIS_ADC_MISC @ 0x12” 寄存器。 已更新 “ALS_IR_ADC_MISC @ 0x1F” 寄存器。 已更新 “6. 订购指南 ” 。 已更新 “ 功能 ” 。 将光电二极管坐标原点改为封装中心。 新增了温度传感器的信息。 新增了使用 MEAS_RATE、 ALS_RATE 和 PS_RATE 的备注。 新增了有关 I2C 广播复位的备注。 新增了性能图。 将 PS1TH、 PS2TH、 PS3TH、 ALS_LO_TH 和 ALS_HIGH_TH 的格式从 8 位压缩更改为 16 位线 性,以获得更精细的阈值控制。 Rev. 1.41 73 Si1141/42/43 修订版 1.2 至修订版 1.3 更新 ALS_LOW_TH0 @ 0x0B、 ALS_LOW_TH1@0x0C、 ALS_HI_TH0@0x0D 和 ALS_HI-TH1@0x0E 的位名称。 将表 14 中的 IRQ_MODE1 更改为 IRQ_MODE2。 将第一页和第 5 节开始处的引脚图中的引脚 5 的引脚 名称从 NC 更改为 DNC。 更改表 17 中引脚 5 的引脚名称和描述。 最小 VDD 从 1.8 V 变为 1.71 V。 修订版 1.3 至修订版 1.4 增加最小 I2C 时钟频率。 更新光电二极管频谱响应。 阐明 Command 寄存器和参数 RAM 的使用。 阐明使用 Si1141 和 Si1142 时的 LED2 和 LED3 连 接。 修订版 1.4 至修订版 1.41 将文档标题从 Si114x 修改为 Si1141-42-43。 更新了 “6. 订购指南 ” 。 添加了通过 74 AEC-Q100 认证的可订购部件号。 Rev. 1.41 Smart. Connected. Energy-Friendly. Products Quality Support and Community www.silabs.com/products www.silabs.com/quality community.silabs.com Disclaimer Silicon Laboratories intends to provide customers with the latest, accurate, and in-depth documentation of all peripherals and modules available for system and software implementers using or intending to use the Silicon Laboratories products. Characterization data, available modules and peripherals, memory sizes and memory addresses refer to each specific device, and "Typical" parameters provided can and do vary in different applications. Application examples described herein are for illustrative purposes only. Silicon Laboratories reserves the right to make changes without further notice and limitation to product information, specifications, and descriptions herein, and does not give warranties as to the accuracy or completeness of the included information. Silicon Laboratories shall have no liability for the consequences of use of the information supplied herein. This document does not imply or express copyright licenses granted hereunder to design or fabricate any integrated circuits. The products are not designed or authorized to be used within any Life Support System without the specific written consent of Silicon Laboratories. A "Life Support System" is any product or system intended to support or sustain life and/or health, which, if it fails, can be reasonably expected to result in significant personal injury or death. Silicon Laboratories products are not designed or authorized for military applications. Silicon Laboratories products shall under no circumstances be used in weapons of mass destruction including (but not limited to) nuclear, biological or chemical weapons, or missiles capable of delivering such weapons. Trademark Information Silicon Laboratories Inc.® , Silicon Laboratories®, Silicon Labs®, SiLabs® and the Silicon Labs logo®, Bluegiga®, Bluegiga Logo®, Clockbuilder®, CMEMS®, DSPLL®, EFM®, EFM32®, EFR, Ember®, Energy Micro, Energy Micro logo and combinations thereof, "the world’s most energy friendly microcontrollers", Ember®, EZLink®, EZRadio®, EZRadioPRO®, Gecko®, ISOmodem®, Precision32®, ProSLIC®, Simplicity Studio®, SiPHY®, Telegesis, the Telegesis Logo®, USBXpress® and others are trademarks or registered trademarks of Silicon Laboratories Inc. ARM, CORTEX, Cortex-M3 and THUMB are trademarks or registered trademarks of ARM Holdings. Keil is a registered trademark of ARM Limited. All other products or brand names mentioned herein are trademarks of their respective holders. Silicon Laboratories Inc. 400 West Cesar Chavez Austin, TX 78701 USA http://www.silabs.com