Uart vs Usart difference uart usart

Difference between UART and USART(UART vs USART)

In this blog post, you will know the difference between UART and USART (UART vs USART). Both UART and USART chips are made by manufacturers to convert incoming and outgoing bytes of data into a serial bitstream.

UART_block_diagram
UART Block Diagram

 

As an embedded engineer it is good to know the actual differences between UART and USART.

Why I am saying this because there are many newbies who think that UART and USART both are the same. But in reality, both are different from each other and they have different properties. UART stands for Universal Asynchronous Receiver Transmitter while USART stands for Universal Synchronous Asynchronous Receiver Transmitter.

The main difference between the UART and USART peripheral is that the UART peripheral supports only asynchronous mode, whereas USART supports both synchronous and asynchronous modes.

If you don’t know what asynchronous and synchronous communication mode is. Don’t worry before explaining the difference between UART and USART I will explain these communication modes.

 

Asynchronous Serial Transmission:

In asynchronous communication, there is no common clock between the sender and receiver. It is widely used for byte-oriented transmission which means it can send 1 byte or character at a time. Asynchronous communication is slow as compared to synchronous and also it has the overhead of start and stops bits. That means, in asynchronous communication, each frame is wrapped with start and stop bit. Let’s see the frame structure of asynchronous communication.

 

Frame structure in Asynchronous Communication:

Mainly it consists of 5 elements:

Start Bit (logic low (0)):  Each frame starts with a START Bit and it is always low. The start bit signals the receiver that a new byte is coming.

Data Bits: Data bits can be 5 to 9 bits packets. Normally we use 8 data bit packet, which is always sent after the START bit.

Parity Bit: If a parity bit is used, it would be placed after all of the data bits.

Stop Bit (logic high (1)): It can be one or two bits. It is sent after the data bits packet to indicate the end of the frame. The stop bit is always logic high.

Idle (logic high (1)): It is no data state always high.

See the below example of a UART frame. In which, one byte is sent, consisting of a start bit, followed by eight data bits (D0-7), an optional parity bit, and one stop bit. It starts with the “start bit” and ends with the “stop bit”.

 

 

Synchronous Serial Transmission:

In synchronous communication, the clock is shared by the sender and receiver. In which we can transmit a block of data and for the block of data only one start and stop bit. it is the reason synchronous communication has less overhead.

Difference between UART and USART (UART vs USART):

Let’s see some other common differences between the UART and USART (UART vs USART) step by step.

UART

USART

  • The full name is the Universal Asynchronous Receiver/Transmitter.
  • The full name is the Universal Synchronous Asynchronous Receiver/Transmitter.
  • There is no incoming clock signal that is associated with the data, so the receiver needs to know the baud rate of the transmitter before the initiation of reception.
  • In which the receiver does not need to know the baud rate of the transmitter. It is derived from the clock signal and the data line provided by the master.
  • Which requires only the data line.
  • Which requires both data and a clock line.
  • Data is transmitted character or byte by byte.
  • The synchronous data is transmitted in the form of blocks.
  • A UART generates its data clock internally to the microcontroller and synchronizes that clock with the data stream by using the start bit transition.
  • In this mode, the sending peripheral will generate a clock that the receiving peripheral can recover from the data stream without knowing the baud rate ahead of time.
  • Due to the overhead of the start and stop bit, the data transfer rate in UART is low as compared to the USART.
  • The use of the external clock allows the data rate of the USART to be much higher than that of a standard UART.
  • A UART is simple and only offers a few options from its base format, such as the number of stop bits and even or odd parity.
  • A USART is more complex and can generate data in a form corresponding to many different standard protocols such as IrDA, LIN, Smart Card, Driver Enable for RS-485 interfaces, and Modbus, to name a few.
  • It cannot work like USART.
  • USART can be worked like UART.

 

Recommended Post: