269
CHAPTER 16 SERIAL INTERFACE (UART0)
16.4 Serial Interface Operations
This section explains the three modes of the serial interface (UART0).
16.4.1 Operation stop mode
Because serial transfer is not performed during this mode, the power consumption can be reduced.
In addition, pins can be used as ordinary ports.
(1) Register settings
Operation stop mode are set by the asynchronous serial interface mode register (ASIM0).
ASIM0 can be set by a 1-bit or 8-bit memory manipulation instruction.
RESET input sets ASIM0 to 00H.
Address: FFA0H After reset: 00H R/W
Symbol
7
6
5
4
3
2
1
0
ASIM0
TXE0
RXE0
PS01
PS00
CL0
SL0
ISRM0
IRDAM0
TXE0
RXE0
Operation mode
RxD0/P23 pin function
TxD0/P24 pin function
0
0
Operation stop
Port function (P23)
Port function (P24)
0
1
UART mode
(receive only)
Serial function (RxD0)
1
0
UART mode
(transmit only)
Port function (P23)
Serial function (TxD0)
1
1
UART mode
(transmit and receive)
Serial function (RxD0)
Caution
Do not switch the operation mode until the current serial transmit/receive operation has
stopped.
16.4.2 Asynchronous serial interface (UART) mode
This mode enables full-duplex operation wherein one byte of data after the start bit is transmitted or received.
The on-chip baud rate generator dedicated to UART enables communications using a wide range of selectable
baud rates.
The UART baud rate generator can also be used to generate a MIDI-standard baud rate (31.25 kbps).
(1) Register settings
UART mode settings are performed by the asynchronous serial interface mode register (ASIM0), asynchronous
serial interface status register (ASIS0), and the baud rate generator control register (BRGC0).
(a) Asynchronous serial interface mode register (ASIM0)
ASIM0 can be set by a 1-bit or 8-bit memory manipulation instruction.
RESET input sets ASIM0 to 00H.
Caution
In UART mode, set the port mode register (PMXX) as follows. Set the output latch to 0.
During receive operation
Set P23 (RXD0) to input mode (PM23 = 1)
During transmit operation
Set P24 (TXD0) to output mode (PM24 = 0)
During transmit/receive operation
Set P23 (RXD0) to input mode, and P24 to output mode