Universal Asynchronous Receiver Transmitter (UART)

Rohit Thakur
4 min readDec 31, 2020

Is a popular and most widely used Protocol for Serial data communication. It is used for transmitting and receiving data asynchronously via the serial port on the computer or any device.

The most important thing about it is it is not only a protocol but also a real hardware which we use on day to day life for data communication. You will read all about this protocol How to build it, which language to use to build it and on which software one can test it.

Language and Tool used

As we read above UART is not just a protocol but also a real hardware so to devlop it one cannot do it with a software language like C, Python , Java etc We need a Hardware Description Language (HDL) like VHDL , Verilog and Tool like Model SIM or Xiline ISE design suite .

IMPORTANT POINTS IN UART COMMUNICATION

  • Two UART’s communicate directly with each other.
  • The Transmitting UART converts parallel data from a controlling device like a CPU into serial form.
  • Transmitting it in serial to the receiving UART.
  • Receiver UART 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 flow from Tx pin of the transmitting UART to Rx pin of the receiving UART.

ASYNCHRONOUS TRANSMISSION OF UART

  • UART transmits asynchronously which means there is no need to transmit clock signal with the transmitted data.
  • Instead of clock, the transmitter transmit data with some special bits to synchronize the sending and receiving inputs.
  • These bits define the beginning and end of the data packet so the receiving UART knows when to start and stop reading the bits.
  • These special bits are (START,DATA,PARITY,STOP) bits.

START BIT:

  • When a word is given to UART for asynchronous transmission, a bit called “START BIT” is added to the beginning of each word that is to be transmitted.
  • The start bit is used to alert the receiver that a word of data is about to sent, and to force the clock in the receiver into synchronization with the clock in the transmitter.

DATA BIT:

  • After the start bit, the individual bits of data are sent, with the least significant bit (LSB) being sent first.
  • Each bit in the transmission is transmitted for exactly the same amount of time as well as the other bits
  • And the receiver looks at the wire at approximately halfway through the period assigned to each bit to determine if the bit is 0 or 1.
  • For example, if it takes 2 second to send each bit, the receiver will track the signal after 1 second has passed.

PARITY BIT:

  • To remove the problem of loss of some bits during the transmission of a signal, error correction mechanism must be added to the transmitted data.
  • Parity bit error checking mechanism is one of the simplest methods to detect any error in received data.
  • In asynchronous serial communication, a parity bit is added at the end of data bits to check the number of 1’s.

STOP BIT:

  • At the end of each data packet, stop bit i.e. 1 is added to indicate the end of one data packet.
  • At the receiver end, this stop bit is used to stop the reception of data.

WORKING OF UART

  • The transmitter receives the 8-bit data from input and stores in some register.
  • The transmitter then adds some special bits like start bit, stop bit and parity bit(if selected) to make the complete data frame.
  • After the successful detection of stop bit the receiver line goes high logic state to indicate idle state and start looking for the next bit.
  • The receiving UART converts the serial data back into parallel and transfers it to the data bus on the receiving end.

Hope you find this post informative . keep an eye for my next post which will be on Verilog coding for this protocol and explanation of its internal modules and structure.

Thanks for reading.

--

--

Rohit Thakur

Dreamer,Blockchain,Electronics Geek ,Trying to make stuff happen(Impossible ones )