UART Serial Communication Protocol

UART Serial Communication ProtocolClick the blue text to follow“CurryCoder’s Programming Life”

WeChat Official Account: CurryCoder’s Programming Life

Skill comes from diligence; neglect leads to decay; success comes from thought; destruction comes from carelessness.

UART Serial Communication Protocol

1. Communication Basics

  • Based on transmission direction, communication can be divided into simplex, half-duplex, and full-duplex communication.
    • Simplex communication: Data can only be sent from the sender to the receiver, and cannot be sent back.
    • Half-duplex communication: Data can be transmitted back and forth between the sender and receiver, but cannot be sent simultaneously.
    • Full-duplex communication: Data can be transmitted simultaneously between the sender and receiver.
  • Baud rate (in bps): The rate at which binary data bits are transmitted, indicating the number of binary bits transmitted per second. For example: 256bps means 256 data bits can be sent per second.
  • Asynchronous communication: A communication method where the sender sends data without waiting for a response from the receiver before sending the next data packet—non-blocking.
  • Synchronous communication: A communication method where the sender sends the next data packet only after receiving a response from the receiver—blocking.

UART Serial Communication Protocol

2. UART Communication Principles

  • UART (Universal Asynchronous Receiver Transmitter) is a universal serial, asynchronous communication bus,which has two data lines and one ground line, supporting full-duplex asynchronous communication. It is commonly used for communication between microcontrollers and peripheral devices.

UART Serial Communication Protocol

  • UART sends 8-bit data from low to high in sequence, and actually sends and receives 10 bits of data at a time. Note: The baud rates of the sender and receiver must match. When the bus is idle, the line remains high; before sending data, a 0 is sent first to change the bus from high to low, signaling the data receiver to prepare. It sends 8 bits of data sequentially from low to high. After the 8 bits of data are transmitted, a 1 is sent to return the bus to a high state. If new data is to be sent, the start bit needs to be sent again, repeating the above process. RS-232 and USB to serial are often used for board-to-board communication.

UART Serial Communication Protocol

UART Serial Communication Protocol

If you find it useful, please give a thumbs up↓

Leave a Comment