| 数据搜索系统,热门电子元器件搜索 |
|
EPC635 数据表(PDF) 28 Page - Espros Photonics corp |
|
|
|||||||||||||||||||||||||||||
EPC635 数据表(HTML) 28 Page - Espros Photonics corp |
|
28 / 97 page ![]() 5.4.8. I2C control command examples: To simplify command sequence definitions, following C-programming language style functions are defined for the I2C master CPU: ■ i2cGeneralCall(byte genAdr, byte cmd); // 20 x tSCL = 20µs ■ i2cSingleWrite(byte devAdr, byte regAdr, byte regVal); // 29 x tSCL = 29µs ■ i2cMultiWrite(byte devAdr, byte regAdr, byte* regVal, byte n // 20 + (n x 9 x tSCL) = 20 + (n x 9)µs ■ byte i2cSingleRead(byte devAdr, byte regAdr); // 39 x tSCL = 39µs ■ byte* i2cMultiRead(byte devAdr, byte regAdr, byte n); // 30 + (n x 9 x tSCL) = 30+(n x 9)µs Software reset with I2C general call command PRECONDITION: None 1. i2cGeneralCall(0x00, 0x06); // Software reset, same effect like RESET pin, 20µs 2. … // Wait for tRESET (> 100ns, see chapter 5.3.2., Software reset via I2C) continue frame acquisition Activates device address with I2C general call command PRECONDITION: None 1. i2cGeneralCall(0x00, 0x04); // Activates I2C device address, 20µs 2. i2cSingleWrite(0x22, 0x92, 0x34); // Start with Sine mode, 4x DCS acquisition on I2C device 0x22... 3. i2cMultiWrite(0x22, ... 4. ... continue frame acquisition Sine mode, 4x DCS mode: Acquire DCS 0 … 3 frames with integration time = 10µs PRECONDITION: All other registers contain default values. 1. i2cSingleWrite(0x20, 0x92, 0x34); // MOD_Control = 0x34 (mod_sel = 00, dcs_sel = 11), 29µs 2. i2cMultiWrite(0x20, 0xA2, &(0x031F), 2); // Int_len = 0x031F (Integration time = 10µs), 38µs 3. i2cSingleWrite(0x20, 0xA4, 0x01); // Shutter_Control = 0x01, (shutter_en = 1), 29µs 4. … // Acquisition starts. Wait until all 4x DCS frames are finished. done. Sine mode, 4x DCS mode: Acquire DCS 0 … 3 with integration time = 10µs, followed by DCS 0 … 3 with integration time 200µs PRECONDITION: All other registers contain default values. 1. i2cSingleWrite(0x20, 0x92, 0x34); // MOD_Control = 0x34 (mod_sel = 00, dcs_sel = 11), 29µs 2. i2cMultiWrite(0x20, 0xA2, &(0x031F), 2); // Int_len = 0x031F (integration time = 10µs), 38µs 3. i2cSingleWrite(0x20, 0xA4, 0x01); // Shutter_Control = 0x01, (shutter_en = 1), 29µs 4. … // Acquisition starts. Wait until all 4x DCS frames are finished. 5. i2cMultiWrite(0x20, 0xA2, &(0x3E7F), 2); // Int_len = 0x3E7F (integration time = 200µs), 38µs 6. i2cSingleWrite(0x20, 0xA4, 0x01); // Shutter_Control = 0x01, (shutter_en = 1), 29µs 7. … // Acquisition starts. Wait until all 4x DCS frames are finished. done. Sine mode, 2x DCS mode: Acquire DCS 0, 1 frames with integration time = 10µs PRECONDITION: All other registers contain default values. 1. i2cSingleWrite(0x20, 0x92, 014); // MOD_Control = 0x14 (mod_sel = 00, dcs_sel = 01), 29µs 2. i2cMultiWrite(0x20, 0xA2, &(0x031F), 2); // Int_len = 0x031F (integration time = 10µs), 38µs 3. i2cSingleWrite(0x20, 0xA4, 0x01); // Shutter_Control = 0x01, (shutter_en = 1), 29µs 4. … // Acquisition starts. Wait until all 2x DCS frames are finished. done. Indirect single write to EEPROM: Store 2 bytes at address 0xE8 and 0xE9 PRECONDITION: None 1. i2cSingleWrite(0x20, 0x11, 0xE8); // EE_ADDR = 0xE8, 29µs 2. i2cSingleWrite(0x20, 0x12, 0x22); // EE_DATA = 0x22 (Temp_tl_cal1 = 0x22), 29µs + 20ms = ~20ms 3. i2cSingleWrite(0x20, 0x12, 0x28); // EE_DATA = 0x28 (Temp_tl_cal2 = 0x28), 29µs + 20ms = ~20ms 4. ... done. Note 1: Start address is written in EE_ADDR. © 2017 ESPROS Photonics Corporation Characteristics subject to change without notice 28 / 97 Datasheet_epc635-V1.02 www.espros.com |
|
链接网址 |
| 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 |