NEC mPD784225 Series User Manual page 277

16-/8-bit single-chip microcontrollers
Table of Contents

Advertisement

CHAPTER 16 ASYNCHRONOUS SERIAL INTERFACE/3-WIRE SERIAL I/O
(c) Transmission
Transmission is begun by writing transmit data to transmission shift register n (TXSn). The start bit, parity
bit, and stop bit(s) are automatically added.
The contents of transmit shift register n (TXSn) are shifted out upon transmission start, and when transmit
shift register n (TXSn) becomes empty, a transmit interrupt (INTSTn) is generated.
Caution In the case of UART transmission, follow the procedure below when performing
transmission for the first time.
<1> Set the port to the input mode (PM21 = 1 or PM71 = 1), and write 0 to the port latch.
<2> Set bit 7 (TXEn) of asynchronous serial interface mode register n (ASIMn) to 1 to
enable UART transmission (output a high level from the TXDn pin).
<3> Set the port to the output mode (PM21 = 0 or PM71 = 0).
<4> Write transmit data to TXSn, and start transmission.
If the port is set to the output mode first, 0 will be output from the pins, which may cause
malfunction.
Remark n = 1, 2
Figure 16-8. Asynchronous Serial Interface Transmit Completion Interrupt Request Timing
TxDn (output)
INTSTn
TxDn (output)
INTSTn
Caution Do not write to asynchronous serial interface mode register n (ASIMn) during transmis-
sion. If you write to the ASIMn 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 (INTSTn) or the interrupt request flag (STIFn) set by INTSTn.
Remark n = 1, 2
D0
D1
D2
START
(a) Stop bit length: 1
D0
D1
D2
START
(b) Stop bit length: 2
User's Manual U12697EJ3V0UM
STOP
D6
D7
Parity
D6
D7
Parity
STOP
277

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mpd784225y seriesMpd784224Mpd784225Mpd78f4225Mpd784224yMpd784225y ... Show all

Table of Contents