In the process of finding the registers that are associated with the individual values of the SPADs, first I created a table which lists all the indexes associated with the internal registers of the VL53L1X. A total number of 4096 indexes were captured and classified with the similar classification of the ST’s libraries structs. The reason for such classification was that it will be easier to identify the registers and their values. A sample of the registers can be seen in the table below:
Figure 1: Sample of the registers
These registers are being read and written through I2C protocol and here are the methods of writing and reading the data using I2C:
Figure 2: Reading 1 byte data from the registers
Figure 3: Writing 1 byte data on a register
Knowing this process helps us understand how the sensor is communicating with the Arduino through the I2C protocol. Therefore, by monitoring this communication line we can capture the bytes fluctuating back and forth from the sensor and as a result spot the bytes and their indexes that are associated with the SPAD values. My next steps are to put all the data communications that are happening in sequential order in the ST’s library in its order to monitor and track all the data communication between the sensor and the microcontroller in the right order and format.