NO:
W90P710 Programming Guide
VERSION:
2.0
PAGE:
204
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
Commands:
1. Write a value into
DIVIDER
register to determine the frequency of serial clock.
2. Set
Tx_NUM
= 0x3 and set
I2C_EN
= 1 of
CSR
register to enable I2C core.
3. Write 0xA0 (slave a write bit 0) to
TxR
register (
TxR[31:24]
).
4. Write address high byte (0x12) to
TxR
register (
TxR[23:16]
), and address low byte (0x34) to
TxR
register (
TxR[15:8]
).
5. Write data 0xAC to
TxR
register (
TxR[7:0]
).
6. Set
START
bit,
STOP
bit, and
WRITE
bit of
CMDR
register.
7. Wait for interrupt or
I2C_TIP
flag to negate
8. Read
I2C_RxACK
bit of
CSR
register, it should be '0'. If it is not ‘0’, there are some errors
happened.
17.4.5.2
Multi-byte (n bytes) write to a slave
Slave address = 0x51 (7b'1010001)
Data address to write to = 0x1234
Multi-byte data to write
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
3. Write data and receive acknowledge from slave for n times
4. Generate stop command