
157
CHAPTER 8 SERIAL INTERFACE FUNCTION
8.2.2 Configuration of asynchronous serial interface
The asynchronous serial interface is controlled by the asynchronous serial interface mode register (ASIMn0,
ASIMn1) and the asynchronous serial interface status register (ASISn) (n = 0, 1). The receive data is stored in the
receive buffer (RXBn), and the transmit data is written to the transmit shift register (TXSn).
Figure 8-1 shows the configuration of the asynchronous serial interface.
(1) Asynchronous serial interface mode registers (ASIM00, ASIM01, ASIM10, ASIM11)
ASIMn0 and ASIMn1 are 8-bit registers that specify the operation of the asynchronous serial interface.
(2) Asynchronous serial interface status registers (ASIS0, ASIS1)
ASISn are registers containing flags that indicate receive errors, if any, and a transmit status flag. Each receive
error flag is set to 1 when a receive error occurs, and is reset to 0 when data is read from the receive buffer
(RXBn), or when new data is received (if the next data contains an error, the corresponding error flag is set).
The transmit status flag is set to 1 when transmission is started, and reset to 0 when transmission ends.
(3) Reception control parity check
The reception operation is controlled according to the contents programmed in the ASIMn0 and ASIMn1
registers. During the receive operation, errors such as parity error are also checked. If an error is found, the
appropriate value is set to the ASISn registers.
(4) Receive shift register
This shift register converts the serial data received on the RXDn pin into parallel data. When it receives 1
byte of data, it transfers the receive data to the receive buffer.
The receive shift register cannot be accessed by the CPU.
(5) Receive buffers (RXB0, RXB0L, RXB1, RXB1L)
RXBn are 9-bit buffer registers that hold receive data. If data of 7 or 8 bits/character is received, 0 is stored
to the most significant bit position of these registers.
If these registers are accessed in 16-bit units, RXB0 and RXB1 are specified. To access in lower 8-bit units,
RXB0L and RXB1L are specified.
While reception is enabled, the receive data is transferred from the receive shift register to the receive buffer
in synchronization with shift-in processing of 1 frame.
When the data is transferred to the receive buffer, a reception completion interrupt request (INTSRn) occurs.
(6) Transmit shift registers (TXS0, TXS0L, TXS1, TXS1L)
TXSn are 9-bit shift registers used for transmit operation. When data is written to these registers, the
transmission operation is started.
A transmission complete interrupt request (INTSTn) is generated after each complete data frame is trasmitted.
When these registers are accessed in 16-bit units, TXS0 and TXS1 are specified. To access in lower 8-bit
units, TXS0L and TXS1L are specified.
(7) Transmission parity control
A start bit, parity bit, and stop bit are appended to the data written to the TXSn registers, according to the
contents programmed in the ASIMn0 and ASIMn1 registers, to control the transmission operation.