Asynchronous Serial Interface (Uart) Mode - NEC 78K0 Series User Manual

8-bit single-chip microcontrollers
Hide thumbs Also See for 78K0 Series:
Table of Contents

Advertisement

15.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)
• Asynchronous serial interface control register 6 (ASICL6)
• Input switch control register (ISC)
• 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 15-8).
<2> Set the BRGC6 register (see Figure 15-9).
<3> Set bits 0 to 4 (ISRM6, SL6, CL6, PS60, PS61) of the ASIM6 register (see Figure 15-5).
<4> Set bits 0 and 1 (TXDLV6, DIR6) of the ASICL6 register (see Figure 15-10).
<5> Set bit 7 (POWER6) of the ASIM6 register to 1.
<6> Set bit 6 (TXE6) of the ASIM6 register to 1. → Transmission is enabled.
Set bit 5 (RXE6) of the ASIM6 register to 1. → Reception is enabled.
<7> 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
and port register.
The relationship between the register settings and pins is shown below.
Table 15-2. Relationship Between Register Settings and Pins
POWER6
TXE6
RXE6
0
0
0
1
0
1
1
0
1
1
Note Can be set as port function.
Remark ×:
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
364
CHAPTER 15 SERIAL INTERFACE UART6
PM13
P13
PM14
×
×
×
Note
Note
Note
×
×
Note
Note
1
×
Note
0
1
0
1
1
Preliminary User's Manual U17260EJ3V1UD
P14
UART6
Operation
T
×
Note
Stop
×
Reception
×
Note
Transmission
×
Transmission/
reception
Pin Function
D6/P13
R
D6/P14
X
X
P13
P14
P13
R
D6
X
T
D6
P14
X
T
D6
R
D6
X
X

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents