35 UART - Universal Asynchronous Receiver Transmitter with Protocol Support

The Universal Asynchronous Receiver Transmitter (UART) module is a serial I/O communications peripheral. It contains all the clock generators, shift registers and data buffers necessary to perform an input or output serial data transfer, independent of device program execution. The UART, also known as a Serial Communications Interface (SCI), can be configured as a full-duplex asynchronous system or one of several automated protocols. The Full Duplex mode is useful for communications with peripheral systems, such as wireless modems and USB to serial interface modules.

Supported protocols include:

  • LIN Host and Client
  • DMX Controller and Receiver
  • DALI Control Gear and Control Device

The UART module includes the following capabilities:

  • Half and full-duplex asynchronous transmit and receive
  • Two-byte input buffer
  • One-byte output buffer
  • Programmable 7-bit or 8-bit byte width
  • 9th bit address detection
  • 9th bit even or odd parity
  • Input buffer overrun error detection
  • Receive framing error detection
  • Hardware and software flow control
  • Automatic checksum calculation and verification
  • Programmable 1, 1.5, and 2 Stop bits
  • Programmable data polarity
  • Manchester encoder/decoder
  • Operation in Sleep
  • Automatic detection and calibration of the baud rate
  • Wake-up on Break reception
  • Automatic and user timed Break period generation
  • RX and TX inactivity time-outs (with Timer2)

The operation of the UART module is controlled through 19 8-bit registers:

  • Three control registers (UxCON0-UxCON2)
  • Error enable and status (UxERRIE, UxERRIR, UxUIR)
  • UART buffer status and control (UxFIFO)
  • Three 9-bit protocol parameters (UxP1-UxP3)
  • 16-bit Baud Rate Generator (UxBRG)
  • Transmit buffer write (UxTXB)
  • Receive buffer read (UxRXB)
  • Receive checksum (UxRXCHK)
  • Transmit checksum (UxTXCHK)

The UART transmit output (TX_out) is available to the TX pin and internally to various peripherals.

Block diagrams of the UART transmitter and receiver are shown in the following figures.

Figure 35-1. UART Transmitter Block Diagram
Figure 35-2. UART Receiver Block Diagram