M16C/62P Group (M16C/62P, M16C/62PT)
17. Serial Interface
Rev.2.41
Jan 10, 2006
Page 212 of 390
REJ09B0185-0241
Figure 17.28
STSPSEL Bit Functions
17.1.3.3
Arbitration
Unmatching of the transmit data and SDAi pin input data is checked synchronously with the rising edge of
SCLi. Use the ABC bit in the UiSMR register to select the timing at which the ABT bit in the UiRB register is
updated. If the ABC bit = 0 (updated bitwise), the ABT bit is set to “1” at the same time unmatching is detected
during check, and is cleared to “0” when not detected. In cases when the ABC bit is set to “1”, if unmatching is
detected even once during check, the ABT bit is set to “1” (unmatching detected) at the falling edge of the clock
pulse of 9th bit. If the ABT bit needs to be updated bytewise, clear the ABT bit to “0” (undetected) after
detecting acknowledge in the first byte, before transferring the next byte.
Setting the ALS bit in the UiSMR2 register to “1” (SDA output stop enabled) factors arbitration-lost to occur, in
which case the SDAi pin is placed in the high-impedance state at the same time the ABT bit is set to “1”
(unmatching detected).
Table 17.14
STSPSEL Bit Functions
Function
STSPSEL = 0
STSPSEL = 1
Output of SCLi and SDAi Pins
Output of transfer clock and data
Output of start/stop condition is
accomplished by a program using
ports (not automatically generated
in hardware)
Output of a start/stop condition
according to the STAREQ,
RSTAREQ and STPREQ bit
Start/Stop Condition Interrupt
Request Generation Timing
Start/stop condition detection
Finish generating start/stop
condition
Start condition
detection interrupt
Stop condition
detection interrupt
(1) When Slave
CKDIR=1 (external clock)
Start condition detection
interrupt
Stop condition detection
interrupt
(2) When Master
CKDIR=0 (internal clock), CKPH=1 (clock delayed)
SDAi
SCLi
Set STAREQ=1
(start)
Set STPREQ=1
(start)
STSPSEL bit
SDAi
SCLi
STSPSEL bit
Set to “1” in
a program
Set to “0” in
a program
Set to “1” in
a program
Set to “0” in
a program
1st 2nd 3rd 4th 5th 6th 7th 8th 9th bit
0
1st 2nd 3rd 4th 5th 6th 7th 8th 9th bit
http://www.xinpian.net
提供单片机解密、IC解密、芯片解密业务
010-62245566 13810019655