M16C/62P Group (M16C/62P, M16C/62PT)
17. Serial Interface
Rev.2.41
Jan 10, 2006
Page 207 of 390
REJ09B0185-0241
NOTES:
1. Set the bit 4 and bit 5 in the U0C1 and U1C1 register to “0”. The U0IRS, U1IRS, U0RRM and U1RRM bits are
in the UCON register.
2. TXD2 pin is N channel open-drain output. No NCH bit in the U2C0 register is assigned. When write, set to “0”.
3. Not all register bits are described above. Set those bits to “0” when writing to the registers in I
2
C mode.
4. When using UART1 in I
2
C mode and enabling the CTS/RTS separate function of UART0, set the CRD bit in the
U1C0 register to “0” (CTS/RTS enable) and the CRS bit to “0” (CTS input).
i=0 to 2
Table 17.11
Registers to Be Used and Settings in I
2
C Mode (1)
Register
Bit
Function
Master
Slave
UiTB
(3)
0 to 7
Set transmission data
Set transmission data
UiRB
(3)
0 to 7
Reception data can be read
Reception data can be read
8
ACK or NACK is set in this bit
ACK or NACK is set in this bit
ABT
Arbitration lost detection flag
Invalid
OER
Overrun error flag
Overrun error flag
UiBRG
0 to 7
Set a bit rate
Invalid
UiMR
(3)
SMD2 to SMD0
Set to “010b”
Set to “010b”
CKDIR
Set to “0”
Set to “1”
IOPOL
Set to “0”
Set to “0”
UiC0
CLK1, CLK0
Select the count source for the UiBRG
register
Invalid
CRS
Invalid because CRD = 1
Invalid because CRD = 1
TXEPT
Transmit buffer empty flag
Transmit buffer empty flag
CRD
(4)
Set to “1”
Set to “1”
NCH
Set to “1”
(2)
Set to “1”
(2)
CKPOL
Set to “0”
Set to “0”
UFORM
Set to “1”
Set to “1”
UiC1
TE
Set this bit to “1” to enable transmission
Set this bit to “1” to enable transmission
TI
Transmit buffer empty flag
Transmit buffer empty flag
RE
Set this bit to “1” to enable reception
Set this bit to “1” to enable reception
RI
Reception complete flag
Reception complete flag
U2IRS
(1)
Invalid
Invalid
U2RRM
(1)
,
UiLCH, UiERE
Set to “0”
Set to “0”
UiSMR
IICM
Set to “1”
Set to “1”
ABC
Select the timing at which arbitration-lost
is detected
Invalid
BBS
Bus busy flag
Bus busy flag
3 to 7
Set to “0”
Set to “0”
UiSMR2
IICM2
See
Table 17.13 I
2
C Mode Functions
See
Table 17.13 I
2
C Mode Functions
CSC
Set this bit to “1” to enable clock
synchronization
Set to “0”
SWC
Set this bit to “1” to have SCLi output fixed
to “L” at the falling edge of the 9th bit of
clock
Set this bit to “1” to have SCLi output fixed
to “L” at the falling edge of the 9th bit of
clock
ALS
Set this bit to “1” to have SDAi output
stopped when arbitration-lost is detected
Set to “0”
STAC
Set to “0”
Set this bit to “1” to initialize UARTi at
start condition detection
SWC2
Set this bit to “1” to have SCLi output
forcibly pulled low
Set this bit to “1” to have SCLi output
forcibly pulled low
SDHI
Set this bit to “1” to disable SDAi output
Set this bit to “1” to disable SDAi output
7
Set to “0”
Set to “0”
http://www.xinpian.net
提供单片机解密、IC解密、芯片解密业务
010-62245566 13810019655