Universal Asynchronous Receiver-Transmitter (UART)

An UART is a peripheral device for asynchronous serial communication that allows two devices to exchange serial data. An UART is usually a part of an integrated circuit (IC) used in computers, microcontrollers, and embedded systems for device-to-device communication.

The UART circuit has only two connectors, one to send or transmit data (the TX connector) and one to receive data (the RX connector). The sending and receiving devices both need to have a UART component. The TX connector on one UART is connected to the RX connector on the other UART and vice versa.

It can communicate in simplex (data can be transmitted in one direction only), half-duplex (data can be transmitted on both directions but only one at a time), or full-duplex modes (data can be transmitted in both directions at the same time).

The sending UART converts parallel data from the device it is connected to into serial form, transmits it in serial to the receiving UART, which converts the serial data back into parallel data for the receiving device.

UARTs transmit data asynchronously, which means there is no clock signal to synchronize the output of bits from the transmitting UART to the sampling of bits by the receiving UART. Both sides are set to a pre-configured baud rate that dictates the speed and timing of data transmission. In addition, the transmitting UART adds start and stop bits to the data packet. These bits define the beginning and end of the data packet, so the receiving UART knows when to start reading the bits.

When the receiving UART detects a start bit then starts to read the incoming bits at a specific frequency known as the baud rate. Baud rate is a measure of the data transfer speed, expressed in bits per second (bps). Both UARTs must operate at the same baud rate and be configured to transmit and receive the same data packet structure.

UART

UART is the communication protocol that is used to exchange data between a computer and the microcontroller (in our projects the Arduino, ESP32 and Raspberry Pico boards) when uploading a program to the microcontroller or when reading data from a microcontroller.