uart protocol about universal asynchronous transmission
1. Introduction to UART Protocol
Faculty Of Engineering
Shahid Chamran University of Ahvaz
March 2025
Kiyanoosh Homayoon
2. Simplex:
Communication is only possible in one direction
Half Duplex:
Communication is possible in both directions, but not simultaneously
Full Duplex:
Communication is possible in both directions simultaneously
Data Transmission Types
Faculty Of Engineering Interface Circuits March 2025 – 1/35
4. Serial communication is a method of transmitting data one bit at a time over a data line
or small number of wires. It is commonly used for communication between computers,
microcontrollers and peripheral devices.
Parallel communication is a method of data transmission where multiple bits are sent
simultaneously over multiple channels (wires or paths) within the same clock cycle. It
contrasts with serial communication where data is sent bit by bit over a single channel.
Introduction to Serial and Parallel Communication
Faculty Of Engineering Interface Circuits March 2025 – 3/35
5. •
The process of sending several bits as a whole, on a link with several parallel channels
It requires a separate channel for each bit to be transmitted
Usually used for very short distances
Parallel Communication
Faculty Of Engineering Interface Circuits March 2025 – 4/35
6. •
Clock Skew: The clock signal (sent from the clock circuit) arrives at different
components (at different time); this happens because of wire interconnect length,
capacitive coupling, material imperfection …etc. It reduces the speed of every link to
the slowest of all the links.
Problems of Parallel Communication
Faculty Of Engineering Interface Circuits March 2025 – 5/35
7. •
Crosstalk: Crosstalk happens if the transmitted signal is badly affected by another
nearby signal, when electromagnetic energy from one cable leaves an imprint on
adjacent cable.
Problems of Parallel Communication
Faculty Of Engineering Interface Circuits March 2025 – 6/35
8. •
Very simple
Crosstalk places an upper limit on the length of parallel data connection (usually
shorter than a serial connection)
Clock skew between different channels
Low data rate compared to serial connection for long distances (due to the last two
reasons)
Has a cable cost higher than a serial connection
Features of Parallel Communication
Faculty Of Engineering Interface Circuits March 2025 – 7/35
9. •
The process of sending data bit by bit sequentially, over a single channel between
sender and receiver.
For correct data transmission, there has to be some form of synchronization between
transmitter and receiver.
Cost of cable and synchronization difficulties make parallel communication
impractical (serial communication is a good alternative)
Serial Communication
Faculty Of Engineering Interface Circuits March 2025 – 8/35
10. •
To reduce the cost of an IC package by reducing the number of pins used for
communication between different IC’s, instead of using parallel communication
Clock skew between different channels is not an issue (for unclocked asynchronous
serial communication links)
A serial connection requires fewer interconnecting cables and hence occupies less
space
Features of Serial Communication
Faculty Of Engineering Interface Circuits March 2025 – 9/35
12. Instead of sending multiple bits simultaneously (parallel communication), serial
communication transmits data sequentially, which reduces the number of wires.
Types of serial communication:
1. Asynchronous (without clock signal) Example: UART
Uses start and stop bits to synchronize data transmission.
2. Synchronous (with clock signal) Example: SPI,I2C
The clock signal keeps the transmitter and receiver synchronized.
Types of Serial Communication
Faculty Of Engineering Interface Circuits March 2025 – 11/35
15. Synchronous & Asynchronous Serial Communications
Faculty Of Engineering Interface Circuits March 2025 – 14/35
16. •
Bit rate: Number of bits sent every second (bits per second)
Baud rate: Number of symbols sent every second, when every symbol can represent
more than one bit (symbols per second)
A serial connection requires fewer interconnecting cables and hence occupies less
space
Example: If a system operates at 9600 bps, it means 9600 bits of data are transmitted per
second.
Example: If a system operates at 2400 baud, it means 2400 signal changes occur per second
Basic of Serial Communication
Faculty Of Engineering Interface Circuits March 2025 – 15/35
17. •
Bit rate is always equal to or greater than Baud rate and their relationship is as follow:
If one bit is transmitted per signal change Bit Rate = baud Rate
If multiple bits are transmitted per signal change Bit Rate > Baud Rate
Basic of Serial Communication
Faculty Of Engineering Interface Circuits March 2025 – 16/35
18. Electronic communications is all about interlinking circuits (processors or other integrated
circuits) to create a symbolic system. For those individual circuits to swap information, they
must a common standard communication protocol. Many communication protocols have
been designed to achieve data exchange.
The most common serial communication standards are RS232, RS485, RS422, USB and
Ethernet.
But because USB and Ethernet require powerful interfaces with complex protocols, many
efficient devices utilized RS232, RS485, RS422.
Serial Communication Standards
Faculty Of Engineering Interface Circuits March 2025 – 17/35
19. An RS-232 serial bus consist of just two communication wires – one for sending data and
another for receiving. As such, serial devices should have two serial pins: the receiver RX,
and the transmitter , TX. Because the communication data is based upon the voltage on the
wires, relative to the ground level, a ground connection must be made between devices that
communicate with RS-232. Here is RS-232 wiring diagram:
RS-232 Standard
Faculty Of Engineering Interface Circuits March 2025 – 18/35
20. RS-422 is designed to be tolerant of noise and forgiving of long cables runs. It is typically
used between one transmitter- receiver pair. Each output can drive up to 10 receivers. It
achieves this by using a differential current drive output which has high immunity to noise.
The noise immunity enables RS422 system to operate over very long connections much
better than RS-232 and Ethernet. Each signal uses two wires to pass the data. The
differential voltage on A and B wires represent the digital value. If B>A value is 1 and if
A>B then value is 0.
RS-422 Standard
Faculty Of Engineering Interface Circuits March 2025 – 19/35
22. RS-422 Multi Drop Wiring
Faculty Of Engineering Interface Circuits March 2025 – 21/35
23. RS-485 is similar to RS-422 upon which is based. The main difference is that up to 32
transmitter-receiver pairs may be present on the RS-485 lines at one time. RS-485
is generally a 2-wire half-duplex system. An RS-485 4-wire full-duplex system is very similar
to RS-422.
RS-485 port has been used for many years. RS-485 has many advantages over both RS232
and USB when it comes to application in noisy industrial environments.
RS-485 Standard
Faculty Of Engineering Interface Circuits March 2025 – 22/35
24. RS-485 Full Duplex Wiring
Faculty Of Engineering Interface Circuits March 2025 – 23/35
25. RS-485 Half Duplex Wiring
Faculty Of Engineering Interface Circuits March 2025 – 24/35
26. •
The sender and receiver must agree on a set of rules known as Protocol
Protocol:
1. When data transmission begins and ends
2. The used bit rate and data packaging format
If there is no reference for the receiver to know when transmission begins or the used bit
rate, it will sample the wrong values (reads the incorrect data bits or incorrectly
interpreting the transmitted signal)
Protocol In Data Communication
Faculty Of Engineering Interface Circuits March 2025 – 25/35
27. •
UART stands for Universal Asynchronous Receiver Transmitter
USART stand for Universal Synchronous Asynchronous Receiver Transmitter
UART and USART are both serial communication protocols, but they have key
differences in how they operate.
Introduction of UART & USART
Faculty Of Engineering Interface Circuits March 2025 – 26/35
28. •
Introduction of UART & USART
Faculty Of Engineering Interface Circuits March 2025 – 27/35
29. •
In the UART or USART protocol, data is sent in the form of serial frames. The overall structure
of a transmitted frame in the simplest and most common mode (known as 8N1) is as follow:
1. Start bit
Always a logic ‘0’ level indicating the start of the frame
When the line is idle, it is held at a logic ‘1’ level. The transition from high to low signals the
receiver that a new frame is beginning
2. Data bits
Typically 7, 8 or 9 data bits are used (8 bits is the most common)
Data is sent from the least si
UART & USART Data Frame
Faculty Of Engineering Interface Circuits March 2025 – 28/35
30. •
Data is sent from the Least Significant Bit (LSB) to the Most Significant Bit (MSB)
3. Parity Bit (optional):
Depending on configuration, it can be ‘None (N)’ , ‘Even (E)’ or Odd (O)
If ‘None’ is selected, no parity bit is transmitted
With ‘Even’ or ‘Odd’ parity, the extra bit is used for single-bit error detection
4. Stop Bit
Usually 1 or 2 stop bits (1 stop bit is most common)
UART & USART Data Frame
Faculty Of Engineering Interface Circuits March 2025 – 29/35
31. •
A logic ‘1’ level indicates the end of the frame. After sending this bit (or bits), the line returns
to the idle (high) state until the next frame begins.
Common Frame Formats:
8N1: 1 start bi, 8 data bits, no parity bit, 1 stop bit
8E1: 1 start bit, 8 data bits, even parity bit, 1 stop bit
7O2: 1 start bit, 7 data bits, odd parity bit, 2 stop bits
UART & USART Data Frame
Faculty Of Engineering Interface Circuits March 2025 – 30/35
32. •
UART (Universal Asynchronous Receiver- Transmitter and TTL (Transistor-Transistor Logic)
are related but distinct concepts. When combined as UART-TTL, it usually refers to a UART
communication interface that operates at TTL voltage levels.
TTL:
A voltage level standard, typically 0V (LOW) and 5V or 3.3V (HIGH)
Features of UART-TTL Communication:
Uses two wires: TX (Transmit) and RX (Receive)
Operates at standard baud rates (9600-115200)
Work at 3.3V or 5V logic levels, depending on the device
Asynchronous- Similar GND
UART-TTL
Faculty Of Engineering Interface Circuits March 2025 – 31/35
33. •
RS-232 To MAX-232 Module and MAX 232 IC
Faculty Of Engineering Interface Circuits March 2025 – 32/35
34. •
Arduino UNO & STM32 USART Pins
Faculty Of Engineering Interface Circuits March 2025 – 33/35