Overview

The UART module is a core-independent peripheral that performs serial data transfers without any CPU intervention. The module includes the following features:

The UART module transmits and receives data using the standard Non-Return-to-Zero (NRZ) format. The NRZ format uses two logic states, VOH and VOL. The VOH Mark state represents a ‘1’ data bit, while the VOL Space state represents a ‘0’ data bit. The NRZ format states that consecutively transmitted data bits of the same value stay at the output level of that bit without returning to the neutral level between bits (Figure 1). An NRZ transmission port idles in the Mark (‘1’) state. Each character transmission consists of a Start bit, followed by seven or eight data bits, one optional parity or address bit, and ends with one or more Stop bits. The Start bit is always a space (‘0’), while Stop bits are always marks (‘1’). The most common data format consists of eight data bits and no parity bit.

Figure 1. NRZ Format
UART Mode Select Bits (MODE<3:0> bits of the UxCON0 register):

The UART module transmits and receives the Least Significant bit (LSb) first, regardless of which mode is selected. Both transmitter and receiver blocks operate independently, but share the same baud rate and data format. A dedicated 16-bit Baud Rate Generator (BRG) derives the baud rate from the system oscillator. Each transmitted bit persists for a period of 1/Baud Rate.