![](http://datasheet.mmic.net.cn/380000/-PD784214Y_datasheet_16744924/-PD784214Y_307.png)
307
CHAPTER 17 ASYNCHRONOUS SERIAL INTERFACE/3-WIRE SERIAL I/O
(d) Reception
When the RXEn bit of the asynchronous serial interface mode register n (ASIMn) is set to 1, reception is
enabled and sampling of the RxDn pin input is performed.
Sampling of the RxDn pin input is performed by the serial clock set in ASIMn.
When the RxDn pin input becomes low level, the 5-bit counter of the port rate generator starts counting, and
outputs the data sampling start timing signal when half the time of the set baud rate has elapsed. If the result
of re-sampling the RxDn pin input with this start timing signal is low level, the RxDn pin input is perceived
as the start bit, the 5-bit counter is initialized and begins counting, and data sampling is performed. When,
following the start bit, character data, the parity bit, and one stop bit are detected, reception of one frame
of data is completed.
When reception of one frame of data is completed, the receive data in the shift register is transferred to the
receive shift register (RXBn),and a receive completion interrupt (INTSRn) is generated.
Moreover, even if an error occurs, the receive data for which the error occurred is transferred to RXBn. If
an error occurs, when bit 1 (ISRMn) of ASIMn is cleared (0), INTSRn is generated. (refer to
Figure 17-10
).
When bit ISRMn is set (1), INTSRn is not generated.
When bit RXEn is reset to 0 during a receive operation, the receive operation is immediately stopped. At
this time, the contents of RXBn and ASISn remain unchanged, and INTSRn and INTSERn are not generated.
Remark
n = 1, 2
Figure 17-9. Asynchronous Serial Interface Receive Completion Interrupt Timing
Caution
Even when a receive error occurs, be sure to read the receive buffer register (RXBn).
If RXBn is not read, an overrun error will occur during reception of the next data, and
the reception error status will continue indefinitely.
Remark
n = 1, 2
D1
D2
D6
D7
Parity
D0
RxDn (input)
INTSRn
STOP
START