SBAA432A april 2020 – july 2023 OPT3001 , OPT3001-Q1 , OPT3004 , OPT3006 , OPT3007
To verify that the I2C mode is functioning correctly, read the Device ID Register, as shown in Table 4-1 and Table 4-2 for OPT4001. For example, when the Device ID Register for the OPT4001 reads 121h, I2C is working correctly. Check the data sheet to verify the correct readout as the readout can differ for other light sensors. For example, the Device ID Register readout needs to be 3001h for all OPT300x devices, such as the OPT3004 or OPT3007.
Register 11h (offset = 11h) [reset = 121h] | |||||||
---|---|---|---|---|---|---|---|
This register is also intended to help uniquely identify the device | |||||||
15 | 14 | 13 | 21 | 11 | 10 | 9 | 8 |
0 | 0 | DIDL | DIDH | ||||
Read or Write-0h | Read or Write-0h | Read-0h | Read-1h | ||||
7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
DIDH | |||||||
Read-21h |
Bit | Field | Type | Reset | Description |
---|---|---|---|---|
15-14 | 0 | Read or Write | 0h | Must read or write 0 |
13-12 | DIDL | Read | 0h | Device ID L |
11-0 | DIDH | Read | 121h | Device ID H |
Another method to test I2C functionality is to write to and read back from the Configuration Register (offset = 11h). This test can be desired in addition to the read Device ID Register test to exercise both read and write functions.