R01UH0092EJ0110 Rev.1.10
Page 492 of 807
Jul 31, 2012
M16C/64C Group
23. Serial Interface UARTi (i = 0 to 2, 5 to 7)
In I
2
C mode, functions and timings vary depending on the IICM2 bit setting in the UiSMR2 register.
Figure 23.20 shows Transfer to UiRB Register and Interrupt Timing. See Figure 23.20 for the timing
of transferring data to the UiRB register, the bit position of the data stored in the UiRB register, types
of interrupts, interrupt requests, and DMA request generation timing.
Table 23.18 lists a comparison of other functions in clock synchronous serial I/O mode with I
2
C mode.
Table 23.18
I
2
C Mode Functions
Function
Clock Synchronous Serial
I/O Mode (SMD2 to SMD0
= 001b, IICM = 0
)
I
2
C Mode (SMD2 to SMD0 = 010b, IICM = 1)
IICM2 = 0
(NACK/ACK interrupt)
IICM2 = 1
(UART transmit/receive interrupt)
CKPH = 1 (Clock delay)
CKPH = 1 (Clock delay)
Start and stop
condition detect
interrupts
-
Start condition or stop condition detection
(See Figure 23.22 “STSPSEL Bit Functions”)
Transmission, NACK
interrupt
UARTi transmission
Transmission started or
completed (selected by
UiIRS)
No acknowledgment
detection (NACK)
Rising edge of the 9th bit of SCLi
UARTi transmission
Falling edge of the 9th bit of SCLi
Reception, ACK
interrupt
UARTi reception
When 8th bit received
CKPOL = 0 (rising edge)
CKPOL = 1 (falling edge)
Acknowledgment detection (ACK)
Rising edge of the 9th bit of SCLi
UARTi reception
Falling edge of the 9th bit of SCLi
Timing for transferring
data from UART
reception shift register
to UiRB register
CKPOL = 0 (rising edge)
CKPOL = 1 (falling edge)
Rising edge of the 9th bit of SCLi
Falling edges of the 8th bit of
SCLi and rising edges of the 9th
bit of SCLi
UARTi transmission
output delay
Not delayed
Delayed
Delayed
Read RXDi and SCLi
pin levels
Possible when the
corresponding port
direction bit = 0
Always possible no matter how
the corresponding port direction
bit is set
Always possible no matter how
the corresponding port direction
bit is set
Initial value of TXDi
and SDAi outputs
CKPOL = 0 (high)
CKPOL = 1 (low)
The value set in the port register
before setting I
2
C mode
The value set in the port register
before setting I
2
Initial and end values
of SCLi
-
Low
Low
DMA1, DMA3 factor
UARTi reception
Acknowledgment detection (ACK)
UARTi reception
Falling edge of the 9th bit of SCLi
Read received data
1st to 8th bits of the
received data are stored
in bits 0 to 7 in the UiRB
register.
1st to 8th bits of the received data
are stored in bits 7 to 0 in the
UiRB register.
Refer to Figure 23.20 “Transfer to
UiRB Register and Interrupt
Timing”.
i = 0 to 2, 5 to 7
SMD2 to SMD0: Bits in the UiMR register
CKPOL: Bit in the UiC0 register
IICM: Bit in the UiSMR register
IICM2: Bit in the UiSMR2 register
CKPH: Bit in the UiSMR3 register
UiIRS: Bit in the UCON or UiC1 register
Notes:
1.
Set the initial value of SDAi output while bits SMD2 to SMD0 in the UiMR register are 000b (serial interface
disabled).
2.
See Figure 23.20 “Transfer to UiRB Register and Interrupt Timing”.
3.
The procedure to change interrupt sources is as follows:
(1) Disable the interrupt to be changed the source.
(2) Change the source of interrupt.
(3) Set the IR bit in the interrupt control register of that interrupt to 0 (no interrupt requested).
(4) Set bits ILVL2 to ILVL0 in the interrupt control register of that interrupt.
Содержание M16C Series
Страница 846: ...M16C 64C Group R01UH0092EJ0110...