Asynchronous Serial Interface (Uart) Mode - NEC mPD78F0730 Preliminary User's Manual

8-bit single-chip microcontroller
Table of Contents

Advertisement

10.4.2 Asynchronous serial interface (UART) mode

In this mode, data of 1 byte is transmitted/received following a start bit, and a full-duplex operation can be
performed.
A dedicated UART baud rate generator is incorporated, so that communication can be executed at a wide range of
baud rates.
(1) Registers used
• Asynchronous serial interface operation mode register 6 (ASIM6)
• Asynchronous serial interface reception error status register 6 (ASIS6)
• Asynchronous serial interface transmission status register 6 (ASIF6)
• Clock selection register 6 (CKSR6)
• Baud rate generator control register 6 (BRGC6)
• Port mode register 1 (PM1)
• Port register 1 (P1)
The basic procedure of setting an operation in the UART mode is as follows.
<1> Set the CKSR6 register (see Figure 10-5).
<2> Set the BRGC6 register (see Figure 10-6).
<3> Set bits 0 to 4 (ISRM6, SL6, CL6, PS60, PS61) of the ASIM6 register (see Figure 10-2).
<4> Set bit 7 (POWER6) of the ASIM6 register to 1.
<5> Set bit 6 (TXE6) of the ASIM6 register to 1. → Transmission is enabled.
<6> Write data to transmit buffer register 6 (TXB6). → Data transmission is started.
Caution Take relationship with the other party of communication when setting the port mode register
The relationship between the register settings and pins is shown below.
POWER6
0
1
Note Can be set as port function.
Remark ×:
Downloaded from
Elcodis.com
electronic components distributor
CHAPTER 10 SERIAL INTERFACE UART6
Set bit 5 (RXE6) of the ASIM6 register to 1. → Reception is enabled.
and port register.
Table 10-2. Relationship Between Register Settings and Pins
TXE6
RXE6
PM13
×
Note
0
0
×
Note
0
1
1
0
0
1
1
0
don't care
POWER6: Bit 7 of asynchronous serial interface operation mode register 6 (ASIM6)
TXE6:
Bit 6 of ASIM6
RXE6:
Bit 5 of ASIM6
PM1×:
Port mode register
P1×:
Port output latch
P13
PM14
P14
Operation
×
×
×
Note
Note
Note
×
×
Note
1
Reception
×
×
Note
Note
1
Transmission
×
1
1
Transmission/
reception
Preliminary User's Manual U19014EJ1V0UD
UART6
Pin Function
T
D6/P13
X
Stop
P13
P13
T
D6
X
T
D6
X
R
D6/P14
X
P14
R
D6
X
P14
R
D6
X
235

Advertisement

Table of Contents
loading

Table of Contents