The EUSART supports 9-bit character reception in the Extract MCU Code Process. When the RX9 bit of the RCSTA register is set the EUSART will shift 9-bits into the RSR for each character received by Extract PIC18F26J13 Microcontroller Source Code.
The RX9D bit of the RCSTA register is the ninth, and Most Significant, data bit of the top unread character in the receive FIFO. When reading 9-bit data from the receive FIFO buffer when Read MCU Binary File, the RX9D data bit must be read before reading the 8 Least Significant bits from the RCREG.
Initialize the SPBRGH, SPBRGL register pair for the appropriate baud rate. Set or clear the BRGH and BRG16 bits, as required, to achieve the desired baud rate.
Clear the ANSEL bit for the RX pin (if applicable).
Enable the synchronous master serial port by setting bits SYNC, SPEN and CSRC before Read MCU AT89C51RE2 Firmware.
Ensure bits CREN and SREN are clear.
If interrupts are desired, set the RCIE bit of the PIE1 register and the GIE and PEIE bits of the INTCON register.
If 9-bit reception is desired, set bit RX9.
Start reception by setting the SREN bit or for continuous reception, set the CREN bit.
Interrupt flag bit RCIF will be set when reception of a character is complete. An interrupt will be generated if the enable bit RCIE was set from Extract PIC18F26J13 Microcontroller Source Code.
Read the RCSTA register to get the ninth bit (if enabled) and determine if any error occurred during reception of Extract IC AT89C51RC Code.
Read the 8-bit received data by reading the RCREG register.
If an overrun error occurs, clear the error by either clearing the CREN bit of the RCSTA register or by clearing the SPEN bit which resets the EUSART by Recover MCU Firmware.