![](http://datasheet.mmic.net.cn/390000/PD784976A_datasheet_16826985/PD784976A_217.png)
217
CHAPTER 13 ASYNCHRONOUS SERIAL INTERFACE
User
’
s Manual U15017EJ2V0UD
(c) Transmission
Transmission is begun by writing transmit data to the transmission shift register 0 (TXS0). The start bit, parity
bit, and stop bit(s) are automatically added.
The contents of the transmit shift register 0 (TXS0) are shifted out upon transmission start, and when the
transmit shift register 0 (TXS0) becomes empty, a transmit interrupt (INTST0) is generated.
Caution
In the case of UART transmission, follow the procedure below for the first byte.
<1> Set the port to input mode (PM26 = 1), and write 0 to the port latch.
<2> Set bit 7 (TXE0) of the asynchronous serial interface mode register 0 (ASIM0) to 1
so as to enable transmission.
<3> Set the port to output mode (PM26 = 0).
<4> Write transmission data to TXS0 and start the transmit operation.
If the port is set to the output mode first, 0 will be output from the pins, which may cause
malfunction.
Figure 13-7. Asynchronous Serial Interface Transmit Completion Interrupt Timing
(a) Stop bit length: 1
(b) Stop bit length: 2
Caution
Do not write to the asynchronous serial interface mode register 0 (ASIM0) during
transmission. If you write to the ASIM0 register during transmission, further transmission
operations may become impossible (in this case, input RESET to return to normal).
Whether transmission is in progress or not can be judged by software, using the transmit
completion interrupt (INTST0) or the interrupt request flag (STIF0) set by INTST0.
STOP
Parity
D7
D6
D2
D1
D0
START
TxD0 (output)
INTST0
STOP
Parity
D7
D6
D2
D1
D0
START
TxD0 (output)
INTST0