English
Language : 

M16C Datasheet, PDF (139/262 Pages) Mitsubishi Electric Semiconductor – SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
Preliminary Specifications REV.B
Mitsubishi microcomputers
Specifications in this manual are tentative and subject to change.
M16C / 6N Group
CUAloRckT2asSypnecchiraolnMouosdeseRrieagl iIs/Oter(UART) mode
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
In the first place, the control bits related to the I2C bus(simplified I2C bus) interface are explained.
Bit 0 of the UART2 special mode register (01F7 ) is used as the I2C mode selection bit.
16
Setting “1” in the I2C mode selection bit (bit 0) goes the circuit to achieve the I2C bus interface effective.
Table 13-5 shows the relation between the I2C mode selection bit and respective control workings.
In order to configure P70 as Nch open drain output, set bit 5 (Nch) in the UART transmit/receive control
register 0 (U2C0).
Since this function uses clock-synchronous serial I/O mode, be sure to set this bit to “0” in UART mode.
P70 through P72 conforming to the simplified I 2C bus
P70/TxD2/SDA
P71/RxD2/SCL
P72/CLK2
Nch open drain/cmos
port select signal
Noize
Filter
Selector
Timer
I/O
UART2
IICM=1
delay
IICM=0
Timer
DQ
T Arbitration
IICM=1
IICM=0
Start condition detection
Stop condition detection
Transmission
register
UART2
Reception register
UART2
S
R Q Bus busy
IICM=0
IICM=1
UART2 transmission/
NACK interrupt
request
IICM=0
IICM=1
UART2 reception/ACK
interrupt request
DMA1 request
Falling edge
detection
L-synchronous
output enabling bit
NACK
DQ
T
Noize
Filter
Noize
Filter
I/O
R
Q
Data bus
Selector
(Port P71 output data latch)
UART2 Internal clock
IICM=1
CLK
IICM=1
External clock
IICM=0
UART2
DQ
T
9th pulse
ACK
IICM=1
Bus collision
detection
IICM=0
Bus collision/start, stop
condition detection
interrupt request
Port reading
UART2 IICM=0
Selector
I/O
* With IICM set to 1, the port terminal is to be readable
even if 1 is assigned to P71 of the direction register.
Timer
To DMA0, DMA1
To DMA0
Figure 13-12. Functional block diagram for I2C mode
Figure 13-12 shows the functional block diagram for I2C mode. Setting “1” in the I2C mode selection bit
(IICM) causes ports P70, P71, and P72 to work as data transmission-reception terminal SDA, clock input-
output terminal SCL, and port P72 respectively. A delay circuit is added to the SDA transmission output,
so the SDA output changes after SCL fully goes to L. An attempt to read Port P71 (SCL) results in getting
the terminal’s level regardless of the content of the port direction register. The initial value of SDA trans-
mission output in this mode goes to the value set in port P70. The interrupt factors of the bus collision
detection interrupt, UART2 transmission interrupt, and of UART2 reception interrupt turn to the start/stop
condition detection interrupt, acknowledgment non-detection interrupt, and acknowledgment detection
interrupt respectively.
The start condition detection interrupt refers to the interrupt that occurs when the falling edge of the SDA
terminal (P70) is detected with the SCL terminal (P71) staying “H”. The stop condition detection interrupt
refers to the interrupt that occurs when the rising edge of the SDA terminal (P70) is detected with the SCL
terminal (P71) staying “H”. The bus busy flag (bit 2 of the special UART2 mode register) is set to “1” by the
139