What is UART?

What is the UART Interface? When should we use this interface?

1 Answer
Can you answer this question?

- everything RF

Feb 26, 2021

Universal Asynchronous Reception and Transmission (UART) is a simple serial communication protocol that allows the host device to communicate with an auxiliary device. The data format and transmission speeds for UART are configurable. UART supports bi-directional, asynchronous and serial data transmission which means that it sends data bits one by one, from the least significant to the most significant, framed by start and stop bits so that precise timing is handled by the communication channel. It has two data lines, one to transmit (TX) and another to receive (RX) which are connected between two devices. UART can also handle synchronization management issues between computers and external serial devices. As UART is an asynchronous serial transmission it doesn't have clocks. Transmitting UART converts parallel data from the master device (eg. CPU) into serial form and transmits serially to receiving UART. It will then convert the serial data back into parallel data for the receiving device. 

It can operate between devices in 3 ways: Simplex, Half-duplex and Full-duplex. In simplex mode data transmission is possible in one direction only. In half-duplex mode data is transmitted in either direction but not simultaneously. In Full-duplex mode data transmission is in both directions simultaneously.

As UART has no clocks, UART adds start and stop bits that are transferred. This helps the receiving UART know when to start reading bits as the bits represent the start and the end of the data packet. When the receiving UART detects a start bit, it will read the bits at BAUD rate. UART data transmission speed is referred to as BAUD Rate and is set to 115,200 by default (BAUD rate is based on symbol transmission rate, but is similar to bit rate). Both UARTs must operate at about the same baud rate. If the difference of BAUD rate is more than 10%, the timing of bits may be off so the user must ensure UARTs are configured to transmit and receive from the same data packet.

Advantages of using UART

  • Simple to operate, well documented as it is a widely used method with a lot of resources online
  • No clock needed
  • Parity bit to allow for error checking

Disadvantages of using UART

  • The size of the data frame is limited to only 9 bits
  • Cannot use multiple master systems and slaves
  • Baud rates of each UART must be within 10% of each other to prevent data loss.
  • Low speed