
R8C/3GM Group
21. Serial Interface (UART0)
R01UH0284EJ0100 Rev.1.00
Aug 09, 2011
21.3
Clock Synchronous Serial I/O Mode
In clock synchronous serial I/O mode, data is transmitted and received using a transfer clock.
Notes:
1. When an external clock is selected, the requirements must be met in either of the following states:
- The external clock is held high when the CKPOL bit in the U0C0 register is set to 0 (transmit data
output at the falling edge and receive data input at the rising edge of the transfer clock)
- The external clock is held low when the CKPOL bit in the U0C0 register is set to 1 (transmit data
output at the rising edge and receive data input at the falling edge of the transfer clock)
2. If an overrun error occurs, the receive data (b0 to b8) in the U0RB register will be undefined.
Table 21.2
Clock Synchronous Serial I/O Mode Specifications
Item
Specification
Transfer data format
Transfer data length: 8 bits
Transfer clocks
The CKDIR bit in the U0MR register is set to 0 (internal clock): fi/(2(n+1))
fi = f1, f8, f32, fC n = setting value in the U0BRG register: 00h to FFh
The CKDIR bit is set to 1 (external clock): Input from the CLKi pin
Transmit start conditions
To start transmission, the following requirements must be met:
(1)- The TE bit in the U0C1 register is set to 1 (transmission enabled).
- The TI bit in the U0C1 register is set to 0 (data present in the U0TB
register).
Receive start conditions
To start reception, the following requirements must be met:
(1)- The RE bit in the U0C1 register is set to 1 (reception enabled).
- The TE bit in the U0C1 register is set to 1 (transmission enabled).
- The TI bit in the U0C1 register is set to 0 (data present in the U0TB
register).
Interrupt request
generation timing
For transmission: One of the following can be selected.
- The U0IRS bit is set to 0 (transmit buffer empty):
When data is transferred from the U0TB register to the UART0 transmit
register (at start of transmission).
- The U0IRS bit is set to 1 (transmission completed):
When data transmission from the UART0 transmit register is completed.
For reception:
When data is transferred from the UART0 receive register to the U0RB
register (at completion of reception).
Error detection
This error occurs if the serial interface starts receiving the next unit of data
before reading the U0RB register and receives the 7th bit of the next unit of
data.
Selectable functions
CLK polarity selection
Transfer data input/output can be selected to occur synchronously with the
rising or the falling edge of the transfer clock.
LSB first, MSB first selection
Whether transmitting or receiving data begins with bit 0 or begins with bit 7
can be selected.
Continuous receive mode selection
Reception is enabled immediately by reading the U0RB register.