19 B5WC Built- In Color Sensor User's Manual (E612- E1- 01)
(1) Write
1. Operation is started by detecting the START condition.
2. The mode is switched to Write mode by receiving data with the Write bit ("0") added to the slave
address (bits 7 to 1).
3. Set the received Write data to the received data address.
(In the case of multiple consecutive Write bytes, when Write data is received in succession, Write
data is set in sequence with the received data address at the top.)
4. The write operation is terminated upon detection of a STOP condition.
(2) Read
1. Operation is started by detecting the START condition.
2. The mode is switched to Write mode by receiving data with the Write bit ("0") added to the slave
address (bits 7 to 1).
3. The register to receive and read the data address is specified.
4. The mode is switched to Read mode by detecting a repeated START condition and receiving the
slave address (bit 7 to 1) plus the Read bit ("1").
5. Outputs 1 byte of data at the address specified by the data address as Read data.
*When 0x02 is specified for the data address, 6 bytes of data from 0x02 to 0x07 are output one
byte at a time in sequence as Read data until NACK is detected.
*Multiple data blocks (described in Chapter 12) cannot be read in a single Read message.
6. After Read data is output, the checksum is output.
*Checksum is output only when the first address of each data block is specified in the data address.
7. Read operation is terminated upon detection of Stop condition.
*If the read operation is continued, the value that can be read is indefinite.
*The following is an example of reading the 6 bytes from 0x02 to 0x07 and the checksum.