You are here

WRITE Operation

To write to a slave device, the I2C master follows these steps:

  1. Sends the START (S) condition.

  2. Sends the I2C address of the slave device.

  3. Sends the WRITE (W) direction bit.

  4. Receives the acknowledgement (ACK) bit.

  5. Sends the internal address where it wants to write.

  6. Receives the acknowledgement (ACK) bit.

  7. Sends data bytes and receives the acknowledgement (ACK) bit after each byte.

  8. Sends the STOP (P) condition.

Write to internal address

To write data using internal address, call the DlnI2cMasterWrite() function. It requires the slave device address (the slaveDeviceAddress parameter), the length of the internal address (the memoryAddressLength parameter) and the internal address (the memoryAddress parameter).

Rating: 
Average: 4 (1 vote)

User login