R01UH0136EJ0210 Rev.2.10
Page 476 of 800
Jul 31, 2012
M16C/64A Group
23. Serial Interface UARTi (i = 0 to 2, 5 to 7)
23.3.1.6
CTS
/
RTS
Function
The
CTS
function is used to start transmit/receive operation when a low signal is applied to the
CTSi
/
RTSi
(i = 0 to 2, 5 to 7) pin. Transmit/receive operation begins when input to the
CTSi
/
RTSi
pin
becomes low. If the low signal is switched to high during a transmit or receive operation, the operation
stops before the next data.
For the
RTS
function, the
CTSi
/
RTSi
pin outputs a low signal when the MCU is ready to receive. The
output level becomes high at the detection of the start bit.
See Table 23.6 “Pin Functions in Clock Synchronous Serial I/O Mode (Multiple Transmit/Receive Clock
Output Pin Function Not Selected)”.
23.3.1.7
CTS
/
RTS
Separate Function (UART0)
This function separates
CTS0
/
RTS0
, outputs
RTS0
from the P6_0 pin, and inputs
CTS0
from the
P6_4 pin. To use this function, set the register bits as follows:
•
The CRD bit in the U0C0 register is 0 (enable
CTS
/
RTS
of UART0)
•
The CRS bit in the U0C0 register is 1 (output
RTS
of UART0)
•
The CRD bit in the U1C0 register is 0 (enable
CTS
/
RTS
of UART1)
•
The CRS bit in the U1C0 register is 0 (input
CTS
of UART1)
•
The RCSP bit in the UCON register is 1 (inputs
CTS0
from the P6_4 pin)
•
The CLKMD1 bit in the UCON register is 0 (CLKS1 not used)
Note that when using the
CTS
/
RTS
separate function,
CTS
/
RTS
of UART1 function cannot be used.
Figure 23.11
CTS
/
RTS
Separate Function
23.3.1.8
Processing When Terminating Communication or When an Error Occurs
When communication is terminated in clock synchronous serial I/O mode, or when a communication
error occurs, use the following procedure to reset communication:
(1) Set the TE bit in the UiC1 (i = 0 to 2, 5 to 7) register to 0 (transmission disabled) and the RE bit to
0 (reception disabled).
(2) Set bits SMD2 to SMD0 in the UiMR register to 000b (serial interface disabled).
(3) Set bits SMD2 to SMD0 in the UiMR register to 001b (clock synchronous serial I/O mode).
(4) Set the TE bit in the UiC1 register to 1 (transmission enabled) and the RE bit to 1 (reception
enabled).
MCU
TXD0 (P6_3)
RXD0 (P6_2)
IN
OUT
CTS
RTS
CTS0 (P6_4)
RTS0 (P6_0)
IC
CLK0 (P6_1)
CLK
Содержание M16C/60 Series
Страница 853: ...M16C 64A Group R01UH0136EJ0210...