
16.1.3.2 Start Condition or Stop Condition Output
The start condition is generated when the STAREQ bit in the UiSMR4 register (i = 0 to 4) is set to 1 (start).
The restart condition is generated when the RSTAREQ bit in the UiSMR4 register is set to 1 (start).
The stop condition is generated when the STPREQ bit in the UiSMR4 is set to 1 (start).
The following is the procedure to output the start condition, restart condition, or stop condition.
(1) Set the STAREQ bit, RSTAREQ bit, or STPREQ bit to 1 (start).
(2) Set the STSPSEL bit in the UiSMR4 register to 1 (start/stop condition generation circuit selected).
Table 16.21
STSPSEL Bit Function
Figure 16.23
STSPSEL Bit Function
Function
STSPSEL = 0
STSPSEL = 1
Output from pins SCLi and
SDAi
Output the serial clock and data.
The start condition or stop condition is
output depending on the program utilizing
port functions. (The start condition and
stop condition are not generated by
hardware)
The start condition or stop condition is
output depending on the status of bits
STAREQ, RSTAREQ, and STPREQ
Timing to generate start
condition and stop condition
interrupt requests
Start condition and stop condition are
detected
Start condition and stop condition
generation are completed
SCLi
SDAi
i = 0 to 4
(1) In slave mode,
the CKDIR bit is set to 1 (external clock) and the STSPSEL bit is set to 0 (no start condition and stop condition output)
(2) In master mode,
the CKDIR bit is set to 0 (internal clock) and the STSPSEL bit is set to 1 (start condition and stop condition output)
Start condition detect interrupt
SCLi
SDAi
Start condition detect interrupt
Stop condition detect interrupt
01
0
1
Setting value of
STSPSEL bit
The STAREQ bit
is set to 1 (start)
The STAREQ bit is set to 1 (start)
Stop condition detect interrupt
"1"
"0"
IR bit in the
BCNiIC register
Set to 0 by an interrupt request acknowledgement or by program
"1"
"0"
IR bit in the
BCNiIC register
Set to 0 by an interrupt request acknowledgement or by program