UART Protocol

UART Protocol

UART, or universal asynchronous receiver transmitter, is one of the most used device-to-device communication protocols. It’s not a communication?protocol like SPI and I2C, but a physical circuit in a microcontroller, or a stand-alone IC. A?UART’s main purpose is to transmit and receive serial data. One of the best things about UART is that it only uses two wires to transmit data between devices.

When the receiving UART detects a start bit,?it starts to read?the incoming bits?at a specific?frequency known as the?baud rate.?Baud rate is a measure of the speed of data transfer,?expressed in bits per second (bps). Both UARTs must operate at about the same baud rate. The baud rate between the transmitting and receiving UARTs can only differ?by about 10% before the timing of bits gets too far off. Both UARTs must also must be configured to transmit and receive the same data packet structure.

In UART communication, two?UARTs communicate directly with each other. The transmitting UART converts parallel data from a controlling device like a CPU into serial form, transmits it in serial to the receiving UART, which then converts the serial data back into parallel data for the receiving device. Only two wires are needed to transmit data between two UARTs. Data flows from?the Tx pin of the transmitting UART to the Rx pin of the receiving UART. 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. Instead of a clock signal, the transmitting UART adds start and stop bits to the data packet being transferred. These bits define the beginning and end of the data packet so the receiving UART knows when to start reading the bits.

The UART that is going to transmit data receives the data from a data bus. The data bus is used to send data to the UART by another?device like a CPU, memory, or microcontroller. Data is transferred from the data bus?to the transmitting UART in parallel form. After the transmitting UART gets the?parallel data from the data bus, it adds a start bit, a parity bit, and a stop bit, creating the data packet. Next,?the data packet is output serially, bit by bit at the Tx pin. The receiving UART reads the data packet bit by bit at its Rx pin. The receiving UART?then converts the data back into parallel form?and removes?the start bit, parity bit, and stop bits. Finally, the receiving UART transfers the data packet in parallel to the?data bus on the?receiving end.

Steps for UART Transmission

First: The transmitting UART receives data in parallel from the data bus.

Second: The transmitting UART adds the start bit, parity bit, and the stop bit(s) to the data frame.

Third: The entire packet is sent serially starting from start bit to stop bit from the transmitting UART to the receiving UART. The receiving UART samples the data line at the preconfigured baud rate.

Fourth: The receiving UART discards the start bit, parity bit, and stop bit from the data frame.

Fifth: The receiving UART converts the serial data back into parallel and transfers it to the data bus on the receiving end.


要查看或添加评论,请登录

Ronak Khandelwal的更多文章

  • I2C Protocol

    I2C Protocol

    I2C combines the best features of SPI and UARTs. I2C can connect multiple slaves to a single master (like SPI) and you…

  • SPI Protocol

    SPI Protocol

    The serial peripheral interface (SPI) is a communication interface used to send data between multiple devices. These…

  • Register Description Language (RDL)

    Register Description Language (RDL)

    For almost every design change, a firmware-accessible register change follows suit. This register change not only…

  • SerDes (Serialization/DeSerialization)

    SerDes (Serialization/DeSerialization)

    The simple goal of the SerDes peripheral is twofold convert SOC parallel data into serialized data that can be output…

  • OSI Model

    OSI Model

    The Open Systems Interconnection (OSI) reference model has been the most basic element of computer networking. The OSI…

  • Arbitration

    Arbitration

    In a computer system, multiple devices, such as the CPU, memory, and I/O controllers, are connected to a common…

  • Synthesis

    Synthesis

    Synthesis is the process of converting RTL code, typically written in hardware description languages like Verilog or…

  • Logic Equivalence Check (LEC)

    Logic Equivalence Check (LEC)

    A logic equivalence check is a crucial step in the VLSI physical design flow that ensures the gate-level netlist…

  • Unified Power Format (UPF)

    Unified Power Format (UPF)

    The Unified Power Format (UPF) is a power specification file used in the design cycle to implement low-power design…

  • Introduction to Reset Domain Crossing (RDC)

    Introduction to Reset Domain Crossing (RDC)

    A reset domain crossing (RDC) occurs when a path’s transmitting flop has an asynchronous reset, and the receiving flop…

社区洞察

其他会员也浏览了