I2C Read” Bar (Figure 2.10, ““I2C Read” Bar”) is used to read data from I2C slave device.
Figure 2.10. “I2C Read” Bar
Each I2C slave device has its own 7-bit address. Enter it in the “Slave address” field. The I2C slave device address is an integer hexadecimal number in the range from 0 to 7F. Click the “Scan I2C Slave” button (Figure 2.9, “The I2C slave device addresses”) to get the list of addresses currently occupied by I2C slave devices.
Some I2C slave devices (e.g. I2C EEPROMs) have their own internal addressing. If your I2C slave device supports internal addressing, you can enter the internal address in the "Memory address" field and the address length (in bytes) in the “Memory address length” field. If your I2C slave device doesn’t support the internal addressing, enter “0” in the “Memory address length” field. Memory address length depends on the I2C slave device type. If the memory address length value is incorrect, you will get the wrong data.
Possible memory address values for the particular memory address length are listed in table.
Memory address length value | Memory address values range |
---|---|
1 | 0-FF |
2 | 0-FFFFFF |
4 | 0-FFFFFFFF |
Enter the number of bytes to be read from the I2C slave device into the “Length” field (integer decimal value from 1 to 256).
After you have entered the correct values, press the “I2c Read” button to read the data from the I2C slave device. You can see the result in the log field (Figure 2.11, “The result of the data reading from the I2C slave device”).
Figure 2.11. The result of the data reading from the I2C slave device