Rev.2.00 Oct 16, 2006 page 57 of 354
REJ09B0340-0200
M30245 Group
2. UART
(4) How to deal with an error
When receiving data, read an error flag and reception data simultaneously to determine which error
has occurred. If the data read is erroneous, initialize the error flag and the UARTi receive buffer
register, then receive the data again.
To initialize the UARTi receive buffer register
1. Set the receive enable bit to “0” (disable reception).
2. Set the receive enable bit to “1” again (enable reception).
To transmit data again due to an error on the reception side, set the UARTi transmit buffer register
again, then transmit the data again.
To set the UARTi transmit buffer register again
1. Set the serial I/O mode select bits to “000
2
” (invalidate serial I/O).
2. Set the serial I/O mode select bits again.
3. Set the transmit enable bit to “1” (enable transmission), then set transmission data in the UARTi
transmit buffer register.
(5) Functions selection
In operating UART, the following functions can be used:
_______ _______
(a) CTS/RTS function
_______
CTS function is a function in which an external IC can start transmission/reception by means of
_______
_______
inputting an “L” level to the CTS pin. The CTS pin input level is detected when transmission/reception
starts, so if the level is gone to“ H” while transmission/reception is in progress, transmission/recep-
tion stops at the next data.
_______
_______
RTS function is a function to inform an external IC that RTS pin output level has changed to “L” when
_______
reception is ready. RTS regoes to “H” at the first falling edge of the transfer clock.
_______ _______
When using clock-asynchronous serial I/O, choose one of three types of CTS/RTS functions.
_______ _______
• CTS/RTS functions disabled
_______ _______
CTS/RTS pin is a programmable I/O port.
_______
• CTS function only enabled
_______ _______
_______
CTS/RTS pin performs the CTS function.
_______
• RTS function only enabled
_______ _______
_______
CTS/RTS pin performs the RTS function.
(b) Data logic select function
This function is to reverse data when writing to transmit buffer register or reading from receive buffer
register.
(c) LSB/MSB first select function
This function is to choose whether to transmit/receive data from bit 0 or bit 7. This is valid when the
transfer data length is 8 bits long.
Choose either of the following:
• LSB first Data is transmitted/received from bit 0.
• MSB first Data is transmitted/received from bit 7.
(d) TxD, RxD I/O polarity reverse function
This function is to reverse a polarity of TxD port output level and a polarity of RxD port input level.
Содержание M16C FAMILY
Страница 12: ...Chapter 1 Hardware...
Страница 13: ...See M30245 group datasheet...
Страница 14: ...Chapter 2 Peripheral Functions Usage...
Страница 303: ...THIS PAGE IS BLANK FOR REASONS OF LAYOUT...
Страница 304: ...Chapter 3 Examples of Peripheral Functions Applications...
Страница 340: ...Chapter 4 External Buses...
Страница 361: ...THIS PAGE IS BLANK FOR REASONS OF LAYOUT...
Страница 362: ...Chapter 5 Standard Characteristics...
Страница 369: ...1753 Shimonumabe Nakahara ku Kawasaki shi Kanagawa 211 8668 Japan M30245 Group REJ09B0340 0200 User s Manual...