APPLICATION
2.5 Serial I/O1
3820 GROUP USER’S MANUAL
2–116
I
Transmit operation in the UART mode
Transmit operation in the UART mode is described below.
G
Start of transmit operation
A transmit operation is started by writing transmit data into the transmit buffer register (address
0018
16
) in the transmit enable state.
8
1
G
Transmit operation
By writing transmit data into the transmit buffer
register, the transmit buffer empty flag (bit 0)
of the serial I/O1 status register (address
0019
16
) is cleared to “0.”
The transmit data written in the transmit buffer
register is transferred to the transmit shift
register.
8
2
When a data transfer from the transmit buffer
register to the transmit shift register is com-
pleted, the transmit buffer empty flag is
set to “1.”
8
3
The transmit data transferred to the transmit
shift register is output from the P4
5
/TxD pin
in synchronization with the falling of the shift
clock, beginning with the start bit. A start bit,
a parity bit and a stop bit are automatically
generated and output in accordance with the
contents set in the UART control register.
The data is output from the least significant
bit of the transmit shift register. Each time 1-
bit data is output, the data of the transmit
shift register is shifted by 1 bit toward the
least significant bit.
8
1: Initialization of register or others for a trans-
mit operation. Refer to
“2.5.4 Register set-
ting example.”
8
2: When the transmit interrupt source selection bit (bit 3) of the serial I/O1 control register (address
001A
16
) is set to “0,” a serial I/O1 transmit interrupt request occurs immediately after transfer in
. When this bit is set to “1,” a transmit interrupt request occurs at the time of
.
8
3: While the transmit buffer empty flag is “1,” it is possible to write the next transmit data into the
transmit/receive buffer register.
Transmit shift register
P4
5
/TxD
ST
D
1
D
2
D
3
D
4
D
5
D
6
D
7
b0
D
0
Serial I/O1 status
register
[Address 19
16
]
b0
0
1
Transmit buffer register
Serial I/O1 status
register
[Address 19
16
]
Write transmit data
Data bus
b0
1
[Address 18
16
]
0
Transmit shift register
Transfer transmit data
Transmit buffer register
Transmit shift register
P4
5
/TxD
D
0
b0
D
1
D
2
D
3
D
4
D
5
D
6
D
7