STM32 UART Lecture 1 – Introduction: UART vs USART

  • Post author:
  • Post category:Blog

 

Introduction: UART vs USART

 

 

UART stands for Universal Asynchronous Receiver Transmitter.

USART stands for Universal Synchronous Asynchronous Receiver Transmitter.

They are basically just a piece of hardware that converts parallel data into serial data.

 

Difference between UART and USART

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

All modern microcontrollers come with a USART module instead of just a UART module. So that you can use the USART module both in the synchronous mode as well as asynchronous mode. Unlike Ethernet, USB, etc., there is no specific port for USART communication. They are commonly used in conjugation with protocols like RS-232, RS-434, USB, etc.

 

In synchronous transmission, the clock is sent separately from the data stream, and no start/stop bits are used. This you have already seen in the case of SPI or I2C communication. This improves data transmission efficiency by avoiding the extra bits like start/stop, which are not useful data.

 

Typically, the USART hardware will have the following components:

  1. Baud rate generator: It generates the required baud rate for the data communication.
  2. TX and RX shift registers.
  3. Transmit/Receive control blocks.
  4. Transmit/Receive buffers.
  5. First-in, First-out (FIFO) buffer memory: Having a FIFO is a very powerful feature but at the same time very expensive. If you take the case of STM32F4xx based microcontroller, it doesn’t support any transmit or receive FIFOs.

We can conclude that the USART is just a piece of hardware in your microcontroller that transmits and receives data bits either in synchronous mode or an asynchronous mode. If it is an asynchronous mode, then the clock will not be sent along with the data. Instead, we use synchronization bits like start and stop along with the useful data.

In the following article, let’s Understand the UART pins 

 

FastBit Embedded Brain Academy Courses,

Click here: https://fastbitlab.com/course1

 

FastBitLab

The FastBit Embedded Brain Academy uses the power of internet to bring the online courses related to the field of embedded system programming, Real time operating system, Embedded Linux systems, etc at your finger tip with very low cost. Backed with strong experience of industry, we have produced lots of courses with the customer enrolment over 3000+ across 100+ countries.

Leave a Reply