EasyManua.ls Logo

STC micro STC8A8K64D4 Series - C Bus; I2 C Function Pin Switch; Registers Related to I; 587

Default Icon
901 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
STC8A8K64D4 Series Manual
- 587 -
21 I
2
C Bus
An I
2
C serial bus controller is integrated in the STC8A8K64D4 series of microcontrollers. I
2
C is a high-speed
synchronous communication bus, which uses SCL (clock line) and SDA (data line) to carry out two-wire synchronous
communication. For the pin allocation of SCL and SDA, STC8A8K64D4 series of microcontrollers provide pin switch
mode that can switch SCL and SDA to different I/O pins. Therefor, it is convenience to use a set of I
2
C as multiple sets
of I
2
C buses through time sharing.
Compared with the standard I
2
C protocol, the following two mechanisms are ignored:
No arbitration will be performed after the start signal (START) is sent.
No timeout detection when the clock signal (SCL) stays at low level.
The I
2
C bus of the STC8A8K64D4 series of microcontrollers offer two modes of operation: master mode (SCL is
the output port, which is used to transmit synchronous clock signal) and slave mode (SCL is the input port, which is
used to receive the synchronous clock signal).
STC innovation: When the I
2
C serial bus controller of STC works in slave mode, the falling edge signal of SDA
pin can wake up the MCU which is in power-down mode. (Note: Due to the fast I
2
C transmission speed, the first packet
of data after the MCU wakes up is generally incorrect.)
21.1 I2C function pin switch
Symbol
Address
B7
B6
B5
B4
B3
B2
B1
B0
P_SW2
BAH
EAXFR
-
I2C_S[1:0]
CMPO_S
S4_S
S3_S
S2_S
I2C_S[1:0]: I
2
C function pin selection bit
I2C_S[1:0]
SCL
SDA
00
P1.5
P1.4
01
P2.5
P2.4
10
P7.7
P7.6
11
P3.2
P3.3
21.2 Registers Related to I
2
C
Symbol
Description
Address
Bit Address and Symbol
Reset
Value
B7
B6
B5
B4
B3
B2
B1
B0
I2CCFG
I2C Configuration Register
FE80H
ENI2C
MSSL
MSSPEED[6:1]
0000,0000
I2CMSCR
I
2
C Master Control Register
FE81H
EMSI
-
-
-
MSCMD[3:0]
0xxx,0000
I2CMSST
I
2
C Master Status Register
FE82H
MSBUSY
MSIF
-
-
-
-
MSACKI
MSACKO
00xx,xx00
I2CSLCR
I
2
C Slave Control Register
FE83H
-
ESTAI
ERXI
ETXI
ESTOI
-
-
SLRST
x000,0xx0
I2CSLST
I
2
C Slave Status Register
FE84H
SLBUSY
STAIF
RXIF
TXIF
STOIF
TXING
SLACKI
SLACKO
0000,0000
I2CSLADR
I
2
C Slave Address Register
FE85H
SLADR[6:0]
MA
0000,0000
I2CTXD
I
2
C Data Transmission Register
FE86H
0000,0000
I2CRXD
I
2
C Data Receive Register
FE87H
0000,0000
I2CMSAUX
I
2
C Master Auxiliary Control
Register
FE88H
-
-
-
-
-
-
-
WDTA
xxxx,xxx0

Table of Contents

Related product manuals