
25
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
MITSUBISHI MICROCOMPUTERS
38C8 Group
(2) Asynchronous Serial I/O (UART) Mode
Clock asynchronous serial I/O mode (UART) can be selected by clear-
ing the serial I/O mode selection bit of the serial I/O control register
to “0”.
Eight serial data transfer formats can be selected, and the transfer
formats used by a transmitter and receiver must be identical.
The transmit and receive shift registers each have a buffer register,
but the two buffers have the same address in memory. Since the shift
register cannot be written to or read from directly, transmit data is
written to the transmit buffer, and receive data is read from the re-
ceive buffer.
The transmit buffer can also hold the next data to be transmitted, and
the receive buffer register can hold a character while the next char-
acter is being received.
Fig. 22 Block diagram of UART serial I/O
Fig. 23 Operation of UART serial I/O function
IN
1/4
1
/
1
6
1/16
ata
us
R
e
c
e
i
v
e
b
u
f
f
e
r
r
e
g
i
s
t
e
r
r
e
s
s
0
0
1
8
1
6
e
c
e
v
e
s
t
r
e
g
s
t
e
r
e
c
e
v
e
u
e
r
u
a
g
e
c
e
v
e
n
t
e
r
r
u
p
t
r
e
q
u
e
s
t
a
u
r
a
t
e
g
e
n
e
r
a
t
o
requency
v
s
on rat
o 1/
n+1
r
e
s
s
0
0
1
1
6
ST/SP/PA generator
T
r
a
n
s
m
i
t
b
u
f
f
e
r
r
e
g
i
s
t
e
r
ata
us
ransm
t s
t reg
ster
r
e
s
s
0
0
1
8
1
6
r
a
n
s
m
t
s
t
r
e
g
s
t
e
r
s
t
c
o
m
p
e
t
o
n
a
g
ransm
t
u
er empty
ag
r
a
n
s
m
t
n
t
e
r
r
u
p
t
r
e
q
u
e
s
t
ress 0019
16
e
t
e
c
t
o
r
etector
contro
reg
ster
ress 001
16
aracter
engt
se
ect
on
t
r
e
s
s
0
0
1
1
6
count source se
ect
on
t
r
a
n
s
m
t
n
t
e
r
r
u
p
t
s
o
u
r
c
e
s
e
e
c
t
o
n
er
a
/
c
oc
se
ect
on
t
oc
contro
c
rcu
t
a
r
a
c
t
e
r
e
n
g
t
s
e
e
c
t
o
n
t
7
b
i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