29.1.2.2 Receiving Data
The receiver data recovery circuit initiates character reception on
the falling edge of the first bit. The first bit, also known as the Start bit, is always a
zero. The data recovery circuit counts one-half bit time to the center of the Start bit and
verifies that the bit is still a zero. If it is not a zero, then the data recovery circuit
aborts character reception, without generating an error, and resumes looking for the
falling edge of the Start bit. If the Start bit zero verification succeeds, then the data
recovery circuit counts a full bit time to the center of the next bit. The bit is then
sampled by a majority detect circuit and the resulting ‘0
’ or ‘1
’ is shifted into the RSR.
This repeats until all data bits have been sampled and shifted into the RSR. One final bit
time is measured and the level sampled. This is the Stop bit, which is always a ‘1
’. If the data recovery circuit samples a ‘0
’ in the Stop bit position, then a framing error is set
for this character, otherwise the framing error is cleared for this character. See Receive Framing Error for more information on framing errors.
Immediately after all data bits and the Stop bit have been received, the character in the RSR is transferred to the EUSART receive FIFO, and the RCxIF interrupt flag bit of the PIR3 register is set. The top character in the FIFO is transferred out of the FIFO by reading the RCxREG register.