239
CHAPTER 14 SERIAL INTERFACE UART0
User
’
s Manual U14701EJ3V0UD
(5) Receive controller
The receive controller controls receive operations based on the values set to asynchronous serial interface mode
register 0 (ASIM0). During a receive operation, it performs error checking, such as for parity errors, and sets
various values to asynchronous serial interface status register 0 (ASIS0) according to the type of error that is
detected.
14.3 Registers to Control Serial Interface UART0
Serial interface UART0 is controlled by the following three types of registers.
Asynchronous serial interface mode register 0 (ASIM0)
Asynchronous serial interface status register 0 (ASIS0)
Baud rate generator control register 0 (BRGC0)
(1) Asynchronous serial interface mode register 0 (ASIM0)
This is an 8-bit register that controls serial interface UART0
’
s serial transfer operations.
ASIM0 is set by a 1-bit or 8-bit memory manipulation instruction.
RESET input sets the value of this register to 00H.
Figure 14-3 shows the format of ASIM0.
Caution In UART mode, set the port mode register (PMXX) as follows. Set the output latch of the port
set to output mode (PMXX = 0) to 0.
During receive operation
Set P20 (R
X
D0) to input mode (PM20 = 1)
During transmit operation
Set P21 (T
X
D0) to output mode (PM21 = 0)
During transmit/receive operation
Set P20 to input mode, and P21 to output mode