
R8C/3GM Group
22. Serial Interface (UART2)
R01UH0284EJ0100 Rev.1.00
Aug 09, 2011
22.5
Special Mode 1 (I2C Mode)
I2C mode is provided for use as a simplified I2C interface compatible mode. Table 22.9 lists the I2C Mode As shown in Table 22.12, the MCU is placed in I2C mode by setting bits SMD2 to SMD0 to 010b and the IICM bit to 1. Because SDA2 transmit output has a delay circuit attached, SDA2 output does not change state until SCL2
goes low and remains stably low.
Notes:
1. When an external clock is selected, the requirements must be met while the external clock is held high.
2. If an overrun error occurs, the received data in the U2RB register will be undefined. The IR bit in the S2RIC
register remains unchanged.
Table 22.9
I2C Mode Specifications
Item
Specification
Transfer data format
Transfer data length: 8 bits
Transfer clock
Master mode
The CKDIR bit in the U2MR register is set to 0 (internal clock): fj/(2(n+1))
fj = f1, f8, f32, fC n = setting value in the U2BRG register: 00h to FFh
Slave mode
The CKDIR bit is set to 1 (external clock): Input from the SCL2 pin
Transmit start conditions
To start transmission, the following requirements must be met:
(1) The TE bit in the U2C1 register is set to 1 (transmission enabled).
The TI bit in the U2C1 register is set to 0 (data present in the U2TB register).
Receive start conditions
To start reception, the following requirements must be met:
(1) The RE bit in the U2C1 register is set to 1 (reception enabled).
The TE bit in the U2C1 register is set to 1 (transmission enabled).
The TI bit in the U2C1 register is set to 0 (data present in the U2TB register).
Interrupt request generation
timing
Start/stop condition detection, no acknowledgement detection, or acknowledgement
detection
Error detection
This error occurs if the serial interface starts receiving the next unit of data before
reading the U2RB register and receives the 8th bit of the next unit of data.
Selectable functions
SDA2 digital delay
No digital delay or a delay of 2 to 8 U2BRG count source clock cycles
canbeselected.
Clock phase setting
With or without clock delay can be selected.