

UART has settings that need to be the same on both devices to have proper communication. Bits can change because of the transmission distance, magnetic radiation, and mismatch baud rates, among other things. Data loss in transmission happens when a bit changed its state while being transmitted. The receiving UART device uses the parity bit to determine if there was a data loss during transmission. After rebuilding the byte, it is stored in the UART buffer.

It may need to receive several packets before it can rebuild the whole data byte from the data frames. If there are no errors in transmission, it will then proceed to strip the start bit, stop bits, and parity bit to get the data frame. The receiving UART device checks the received packet (via RX pin) for errors by calculating the number of 1’s and comparing it with the value of the parity bit contained in the packet. After preparing the packet, the UART circuit then sends it out via the TX pin.
