NO:
W90P710 Programming Guide
VERSION:
2.0
PAGE:
203
The above information is the exclusive intellectual property of Winbond Electronics and shall not be disclosed, distributed or reproduced without permission
from Winbond.
Table No.: 2005-W90P710-11-A
17.4.4 Data
Transfer
To write data to a slave, store the data to be transmitted in the
TxR
and set the
WRITE
bit in
CMDR
. To read data from a slave, set the
READ
bit in
CMDR
. During a transfer the core set the
I2C_TIP flag, indicating that a
Transfer is In Progress
. When the transfer is done the
I2C_TIP
flag in
CSR
is cleared, the
IF
flag set if enabled, then an interrupt generated. The Receive Register
RxR
contains valid data after the IF flag has been set. The software may issue a new write or read
command when the
I2C_TIP
flag is cleared.
17.4.5
Below list Some Examples of I2C Data Transaction
17.4.5.1
Write One Byte of Data to Slave
Slave address = 0x50 (7b'1010000)
Data address = 0x1234
Data to write = 0xAC
I
2
C Sequence:
1. Generate start command
2. Start multiple data transfer
(1) Write slave a write bit and receive acknowledge from slave
(2) Write data address high byte and receive acknowledge from slave
(3) Write data address low byte and receive acknowledge from slave
(4) Write data and receive acknowledge from slave
3. Generate stop command
f rom m as ter to s lav e
f rom s lav e to m as ter
A = ac k nowledge (SD A low)
A = not ac k nowledge (SD A high)
S = STAR T c ondition
P = STOP c ondition
S
Slav e A ddres s
(7b'1010000)
R/W
A
Data A ddres s
(0x 12)
A
A /A
P
Data A ddres s
(0x 34)
A
Data
(0x A C)
'0'(write)