English
Language : 

UPD784938 Datasheet, PDF (439/733 Pages) NEC – 16-Bit Single-Chip Microcontrollers
CHAPTER 18 ASYNCHRONOUS SERIAL INTERFACE/3-WIRE SERIAL I/O
18.2.7 Receive errors
Three kinds of errors can occur in a receive operation: parity errors, framing errors, and overrun errors. As the result
of data reception, an error flag is raised in the asynchronous serial interface status register (ASIS) and a receive error
interrupt (INTSER) is generated. Receive error causes are shown in Table 18-2.
It is possible to detect the occurrence of any of the above errors during reception by reading the contents of the ASIS
(see Figures 18-4 and 18-8).
The contents of the ASIS register are cleared (to 0) by reading the serial receive buffer (RXB) or by reception of the
next data (if there is an error in the next data, the corresponding error flag is set).
Table 18-2. Receive Error Causes
Receive Error
Parity error
Framing error
Overrun error
Cause
Transmit data parity specification and receive data parity do not match
Stop bit not detected
Reception of next data completed before data is read from receive buffer
Figure 18-8. Receive Error Timing
RxD (input)
INTSRNote
D0 D1 D2
START
STOP
D6 D7 Parity
INTSER
Note If a receive error occurs while the ISRM bit is set (to 1), INTSR is not generated.
Remark In the µPD784938, a break signal cannot be detected by hardware. As a break signal is a low-level signal
of two characters or more, a break signal may be judged to have been input if software detects the occurrence
of two consecutive framing errors in which the receive data was 00H. The chance occurrence of two
consecutive framing errors can be distinguished from a break signal by having the RxD pin level read by
software (confirmation is possible by setting “1” in bit 0 of the port 3 mode register (PM3) and reading port
3 (P3)) and confirming that it is “0”.
Cautions 1. The contents of the asynchronous serial interface status register (ASIS) are cleared (to 0) by
reading the serial receive buffer (RXB) or by reception of the next data. If you want to find the details
of an error, therefore, ASIS must be read before reading RXB.
2. The RXB must be read even if there is a receive error. If RXB is not read, an overrun error will
occur when the next data is received, and the receive error state will continue indefinitely.
Preliminary User’s Manual U13987EJ1V0UM00
439