Renesas M16C/64C User Manual page 520

Table of Contents

Advertisement

M16C/64C Group
CTS/RTS Function
23.3.2.5
The CTS function is used to start transmit operation when a low signal is applied to the CTSi / RTSi (i =
0 to 2, 5 to 7) pin. Transmit operation begins when input to the CTSi / RTSi pin becomes low. If the input
level is switched from low to high during transmit operation, the operation stops after the ongoing
transmit/receive operation is completed.
When the RTS function is selected, the CTSi / RTSi pin outputs a low signal when the MCU is ready to
receive. The output level becomes high when a start bit is detected.
See Table 23.10 "I/O Pin Functions in UART Mode".
CTS/RTS Separate Function (UART0)
23.3.2.6
This function separates CTS0 and 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 function of UART1 cannot be used.
Figure 23.17 CTS/RTS Separate Function
23.3.2.7
Processing When Terminating Communication or When an Error Occurs
If communication is terminated in UART mode, or a communication error occurs, use following
procedure 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 100b (UART mode character bit length is 7 bits),
101b (UART mode character bit length is 8 bits), and 110b (UART mode character bit length is 9
bits).
(4) Set the TE bit in the UiC1 register to 1 (transmission enabled) and the RE bit to 1 (reception
enabled).
R01UH0092EJ0110 Rev.1.10
Jul 31, 2012
MCU
TXD0 (P6_3)
RXD0 (P6_2)
RTS0 (P6_0)
CTS0 (P6_4)
23. Serial Interface UARTi (i = 0 to 2, 5 to 7)
IC
IN
OUT
CTS
RTS
Page 487 of 807

Advertisement

Table of Contents
loading

This manual is also suitable for:

M16c/60 seriesM16c series

Table of Contents