43
3886 Group
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
MITSUBISHI MICROCOMPUTERS
Fig. 38 Structure of I
2
C control register
[I
2
C Control Register (S1D)] 0015
16
The I
2
C control register (address 0015
16
) controls data communi-
cation format.
Bits 0 to 2: Bit counter (BC0–BC2)
These bits decide the number of bits for the next 1-byte data to be
transmitted. The I
2
C interrupt request signal occurs immediately
after the number of count specified with these bits (ACK clock is
added to the number of count when ACK clock is selected by ACK
bit (bit 7 of address 0016
16
)) have been transferred, and BC0 to
BC2 are returned to “000
2
”.
Also when a START condition is received, these bits become
“000
2
” and the address data is always transmitted and received in
8 bits.
Bit 3: I
2
C interface enable bit (ES0)
This bit enables to use the multi-master I
2
C BUS interface. When
this bit is set to “0,” the use disable status is provided, so that the
S
DA
and the S
CL
become high-impedance. When the bit is set to
“1,” use of the interface is enabled.
When ES0 = “0,” the following is performed.
PIN = “1,” BB = “0” and AL = “0” are set (which are bits of the I
2
C
status register at address 0014
16
).
Writing data to the I
2
C data shift register (address 0012
16
) is dis
abled.
Bit 4: Data format selection bit (ALS)
This bit decides whether or not to recognize slave addresses.
When this bit is set to “0,” the addressing format is selected, so
that address data is recognized. When a match is found between
a slave address and address data as a result of comparison or
when a general call (refer to “(5) I
2
C Status Register,” bit 1) is re-
ceived, transfer processing can be performed. When this bit is set
to “1,” the free data format is selected, so that slave addresses are
not recognized.
Bit 5: Addressing format selection bit (10BIT SAD)
This bit selects a slave address specification format. When this bit
is set to “0,” the 7-bit addressing format is selected. In this case,
only the high-order 7 bits (slave address) of the I
2
C address regis-
ter (address 0013
16
) are compared with address data. When this
bit is set to “1,” the 10-bit addressing format is selected, and all
the bits of the I
2
C address register are compared with address
data.
Bit 6: System clock stop selection bit (CLKSTP)
When executing the WIT or STP instruction, this bit selects the
condition of system clock provided to the multi-master I
2
C-BUS in-
terface. When this bit is set to “0,” system clock and operation of
the multi-master I
2
C-BUS interface stop by executing the WIT or
STP instruction.
When this bit is set to “1,” system clock and operation of the multi-
master I
2
C-BUS interface do not stop even when the WIT
instruction is executed.
When the system clock stop selection bit is “1,” do not execute the
STP instruction.
Bit 7: I
2
C-BUS interface pin input level selection bit
This bit selects the input level of the S
CL
and S
DA
pins of the multi-
master I
2
C-BUS interface.
b7
I
T
S
SC
L
T
K
P
S
1
0
S
A
B
I
T
D
A
L
S E
S
0 B
C
2 B
C
1 B
C
0
b
0
S
s
y
e
s
l
e
0
t
e
c
m
t
i
:
S
w
o
:
N
s
W
(
D
i
n
n
y
h
r
o
t
o
I
c
l
b
s
e
S
t
p
T
o
s
t
o
c
i
t
e
P
s
y
w
i
n
n
o
r
u
k
m
e
s
h
s
t
c
t
s
t
o
p
o
t
n
T
e
i
n
t
e
t
r
u
i
o
c
l
c
s
e
n
u
s
n
o
u
t
r
m
e
c
e
.
)
c
t
u
x
t
i
t
k
i
n
c
c
e
o
h
s
g
t
i
o
c
n
e
t
o
c
u
o
W
n
k
t
p
T
x
I
i
1
l
n
g
S
T
P
I
2
C
(
S
c
D
o
n
:
t
r
d
o
l
r
r
e
e
g
s
i
s
t
e
0
r
1
1
a
d
s
0
5
1
6
)
B
t
r
i
t
n
2 b
0
0
0
0
1
1
1
1
c
o
s
u
n
i
t
1 b
0
0
1
1
0
0
1
1
t
/
e
r
r
c
0
0 :
1 :
0 :
1 :
0 :
1 :
0 :
1 :
(
e
N
u
v
m
e
b
b
e
i
t
r
)
o
f
a
b
m
e
i
s
8
7
6
5
4
3
2
1
I
2
C
e
n
-
B
b
:
:
U
l
e
D
E
S
b
i
n
i
i
t
a
a
n
b
b
t
e
r
f
a
c
e
a
0
1
s
l
e
e
d
d
l
D
a
t
a
:
f
A
F
o
r
d
r
m
d
e
a
r
e
t
s
a
s
s
e
i
t
a
l
e
g
f
c
o
t
f
r
i
o
m
o
n
m
a
b
a
t
i
t
t
0
1
:
e
d
n
r
A
s
d
e
d
l
e
r
c
e
t
s
i
o
0
f
o
1
a
s
i
n
7
r
m
:
1
d
d
g
b
-
t
b
f
o
r
m
a
t
n
:
i
i
b
s
t
a
d
d
r
e
s
s
i
n
g
a
0
r
e
t
-
s
i
t
i
n
g
f
o
r
m
a
t
I
2
C
l
e
-
e
0
1
B
l
U
s
:
:
S
e
C
S
i
c
O
B
n
t
i
e
o
S
U
r
n
S
f
a
b
n
i
c
e
t
u
p
p
i
n
i
n
p
u
t
v
l
M
M
t
i
i
p
n
t
u
t