XI - 31
Chapter 11
Serial Interface 0
Operation
nActivation Factor for Communication
At transmission, if any data is set to the transmission data buffer TXBUF0, a start condition is generated
to start transfer. At reception, if a start condition is received, communication is started. At reception, if the
data length of "L" for start bit is longer than 0.5 bit, that can be regarded as a start condition.
nTransmission
Data transfer is automatically started by setting data to the transmission data buffer TXBUF0. When the
transmission is completed, the serial 0 transmission interrupt SC0TIRQ is generated.
nReception
Once a start condition is received, reception is started after the transfer bit counter that counts transfer
bit is cleared. When the reception is completed, the serial 0 reception interrupt SC0RIRQ is generated.
nDuplex communication
On duplex communication, the transmission and reception can be operated separately at the same time.
The frame mode and parity bit of the used data on transmission / reception should have the same
polarity.
nTransfer bit Count Setup
The transfer bit count is automatically set after the frame mode is specified by the SC0FM1 to 0 flag of
the SC0MD2 register. If the SC0CMD flag of the SC0MD1 register is set to "1", and UART communica-
tion is selected, the setup by the synchronous serial transfer bit count selection flag SC0LNG2 to 0 is no
more valid.
nData Input Pin Setup
The communication mode can be selected from with 2 channels (data output pin (TXD pin), data input
pin (RXD pin)), or with 1 channel (data I/O pin TXD pin). The RXD pin can be used only for serial data
input. The TXD pin can be used for serial data input or output. The SC0IOM flag of the SC0MD1 register
can specify which pin, RXD or TXD inputs the serial data. If "data input from TXD pin" is selected to be
with 1 line communication, transmission / reception is switched by controlling TXD pin's direction by the
P0DIR0 flag of the P0DIR register. At that time, the RXD pin can be used as a general port.
nReception Buffer Empty Flag
When SC0RIRQ is generated, data is stored to RXBUF0 from the internal shift register, automatically. If
data is stored to the shift register RXBUF0, the reception buffer empty flag SC0REMP of the SC0MD3
register is set to "1". That indicates that the received data is going to be read out. SC0REMP is cleared
to "0" by reading out the data of RXBUF0.