Вы здесь

"I2C Write" Bar

The “I2C Write” Bar (Figure 2.12, “The "I2C Write" Bar”) is used to send data into the I2C slave device.

Figure 2.12. The "I2C Write" Bar

The "I2C Write" 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 the 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.

The possible memory address values for the particular memory address length are listed in table.

Memory address length valueMemory address values range
10-FF
20-FFFFFF
40-FFFFFFFF

In the “Data” field you can enter the data to be sent to the I2C slave device. You can type hexadecimal values (from 0 to FF) to the field. To enter more then one value separate them by space.

After you have entered the correct values press the “I2с Write” button to send the data to the I2C slave device. You can see the result in the log field Figure 2.13, “The result of data writing into the I2C slave device”.

Figure 2.13. The result of data writing into the I2C slave device

The result of data writing into the I2C slave device

Rating: 
Голосов пока нет

Языки

Вход на сайт