RX − 8801 SA / JE
8.6.6. I2C bus protocol
In the following sequence descriptions, it is assumed that the CPU is the master and the
a. Address specification write sequence
Since the
(1)CPU transfers start condition [S].
(2)CPU transmits the
(3)Check for ACK signal from
(4)CPU transmits write address to
(5)Check for ACK signal from
(6)CPU transfers write data to the address specified at (4) above.
(7)Check for ACK signal from
(8)Repeat (6) and (7) if necessary. Addresses are automatically incremented.
(9)CPU transfers stop condition [P].
(1) | (2) |
| (3) | (4) | (5) | (6) | (7) | (8) |
| (9) | |
|
|
|
|
|
|
|
|
|
|
|
|
S | Slave address | 0 | 0 | Address | 0 | Data | 0 |
| Data | 0 | P |
|
|
|
|
|
|
|
|
|
|
|
|
|
| R/W |
|
|
|
|
|
|
|
|
|
ACK signal from
b. Address specification read sequence
After using write mode to write the address to be read, set read mode to read the actual data.
(1)CPU transfers start condition [S].
(2)CPU transmits the
(3)Check for ACK signal from
(4)CPU transfers address for reading from 8801.
(5)Check for ACK signal from
(6)CPU transfers RESTART condition [Sr] (in which case, CPU does not transfer a STOP condition [P]).
(7)CPU transfers
(8)Check for ACK signal from
(9)Data from address specified at (4) above is output by the
(10)CPU transfers ACK signal to
(11)Repeat (9) and (10) if necessary. Read addresses are automatically incremented.
(12)CPU transfers ACK signal for "1".
(13)CPU transfers stop condition [P].
(1) | (2) |
| (3) | (4) |
| (5) | (6) | (7) |
|
| (8) | (9) | (10) | (11) | (12) | (13) | ||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
S | Slave address | 0 | 0 | Address |
| 0 | Sr | Slave address | 1 | 0 | Data | 0 |
|
| Data | 1 | P | |||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| R/W |
|
|
|
|
|
|
|
|
|
| R/W |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| ||
|
|
|
|
|
|
| ACK from |
|
|
|
|
|
|
|
|
| ACK from CPU |
|
|
| ||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| ||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
c. Read sequence when address is not specified
Once read mode has been initially set, data can be read immediately. In such cases, the address for each read operation is the previously accessed address + 1.
(1)CPU transfers start condition [S].
(2)CPU transmits the
(3)Check for ACK signal from
(4)Data is output from the
(5)CPU transfers ACK signal to
(6)Repeat (4) and (5) if necessary. Read addresses are automatically incremented in the
(7)CPU transfers ACK signal for "1".
(8)CPU transfers stop condition [P].
(1) | (2) |
|
| (3) |
| (4) | (5) | (6) | (7) | (8) | ||||||
S | Slave address | 1 | 0 |
| Data | 0 |
|
| Data | 1 | P | |||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| R/W |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| ACK from |
|
|
|
|
|
| ACK from CPU |
|
|
| |||
|
|
|
|
|
|
|
|
|
|
|
| |||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Page - 25 |