www
.mcu.com.cn
188
/
239
Rev.
1.00
CMS80F731x Reference Manual
21.4 I2C Slave Mode
There are five registers for connecting to the target device: self address, control, status, send data, and receive data
registers.
register
address
write
Read
Self address register I2CSADR
Self address register I2CSADR
0xF1
Control register I2CSCR
Status register I2CSSR
0xF2
Send data I2CSBUF
Receive data I2CSBUF
0xF3
21.4.1
I2C Own Address Register I2CSADR
The own address register
consists of seven address
bits that identify the I2C
core on the
I2C bus. This register can R/W
addresses.
Own address register I2CSADR
0xF1
Bit7
Bit6
Bit5
Bit4
Bit3
Bit2
Bit1
Bit0
I2CSADR
--
SA6
SA5
SA4
SA3
SA2
SA1
SA0
R/W
R
R/W
R/W
R/W
R/W
R/W
R/W
R/W
Reset value
0
0
0
0
0
0
0
0
Bit7
--
Reserved, must be 0.
Bit6~Bit0
AT<6:0>:
Theown address of the I2C slave mode.
21.4.2
I2C Slave Mode Control and Status Registers
I2CSCR/I2CSSR
Slave mode control registers and slave mode status registers occupy a register address, using different operations to access
the two registers separately:
Write operation: Write to I2CSCR (write only)
Read operation: Read I2CSSR (read-only)
The control register consists of two bits: RSTS and DA bits. The RSTS bit controls the reset of the entire I2C Slave module,
and when the I2C bus encounters some problem, the software enables the bit to reinitialize the I2CS. The DA bit enables and
disables I2CS device operation. Reading this address places the status register on the data bus.
Slave mode control register I2CSCR
0xF2
Bit7
Bit6
Bit5
Bit4
Bit3
Bit2
Bit1
Bit0
I2CSCR
RSTS
--
--
--
--
--
--
OF
R/W
In
R
R
R
R
R
R
In
Reset value
0
0
0
0
0
0
0
0
Bit7
RSTS:
I2Cslave module reset control bit;
1=
Reset slave module;
0=
No impact.
Bit6~Bit1
--
Reserved, must be 0.
Bit0
OF:
I2C Slave mode enable bit;
1=
Enable;
0=
Disable.