6
\$\begingroup\$

Some say UART is hardware, some say UART is one of the serial communication protocol.

UART is a protocol

UART is a protocol

UART is Hardware

UART is Hardware

\$\endgroup\$

closed as primarily opinion-based by Chris Stratton, Elliot Alderson, brhans, Chupacabras, Harry Svensson Oct 6 '18 at 18:30

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 6
    \$\begingroup\$ If you look up the words in the acronym, the origin is clear. Common usage may be more habitual than correct. A question consisting primarily of 4 links and asking an opinion is not within the mission of this site. \$\endgroup\$ – Chris Stratton Oct 5 '18 at 16:05
  • \$\begingroup\$ I see someone watches Death Note, Mr. Yagami ;) Anyways, I would say it's both. How it transmits and receives information through digital signal processing is the protocol and the chip that provides these protocols is the hardware. \$\endgroup\$ – KingDuken Oct 5 '18 at 16:23
  • \$\begingroup\$ Some people say "Async Serial" when referring specifically to the protocol and not to the hardware. Its origins go all the way back to the 1800s. I don't know if it's described in any formal, international standard. \$\endgroup\$ – user197845 Oct 5 '18 at 16:44
  • \$\begingroup\$ Some people also say "RS-232", but strictly speaking, RS-232 specifies the electrical interface between a UART and a modem, without saying much about the UART itself. \$\endgroup\$ – user197845 Oct 5 '18 at 16:48
17
\$\begingroup\$

Both of your first two links are, simply, wrong. A UART is a piece of hardware which can implement a number of different protocols which are used to frame asynchronous data streams. The U is an acronym for "Universal", and while it is effectively correct there is no reason a protocol could not be used which confounds the present population of UARTs - other than the fact that it's not worth the effort.

The different protocols handled use different numbers of bits for detecting start and stop conditions, presence or absence of a parity bit (and its polarity), and frame data lengths. Typically you can specify 5,6,7 or 8 data bits per frame. If someone were to insist that his/her data must be formatted into 4-bit frames, no existing UART chip would be able to handle it.

In part, this is a matter of definition. Merriam-Webster, for instance defines protocol (for this context) as

a set of conventions governing the treatment and especially the formatting of data in an electronic communications system

Note that the hardware implementation is not part of the definition.

\$\endgroup\$
6
\$\begingroup\$

UART (Universal Asynchronous Reciever/Transmitter) most properly refers to a funcional block (normally hardware but occasionally software) for transmitting and receiving asynchronous serial data that can be configured for a selection of different baud rates, bit counts, parity etc.

But despite the "universal" in the name the flexibility is still quite limited and the basic format largely fixed. There is a "start bit" when the line moves away from idle state to indicate the start of a "byte", a number (usually 7 or 8) of data bits, optionally a parity bit and then one or two "stop bits" with the line back in idle state to ensure that each byte starts with a transition out of idle state.

People need a name for this family of encodings, they could just use the term "asynchronous serial", but that is rather too vauge. There are plenty of asynchronous serial encodings that are very different from those that can be handled by a UART. So for better or worse this method of encoding gets refered to as "UART serial" or just "UART". Essentially the encoding gets named after the hardware used to implement it.

\$\endgroup\$
  • \$\begingroup\$ Under some circumstances there can be 1 1/2 stop bits, particularly when using 5-bit partitioning. \$\endgroup\$ – WhatRoughBeast Oct 6 '18 at 22:31
6
\$\begingroup\$

It is a both actually. UA stands for Universal Asynchronous which handles asynchronous serial transmission. RT stands for Receiver/Transmitter which are clearly hardware terms.

The UART is both the hardware which implements the (UART) protocol. The hardware part is mostly called the UART 'peripheral' or device.

However, the UART protocol can also implemented by software only (by using 2 GPIO pins for receiving and transmitting). Mostly this severely uses up the CPU power (depending on the communication speed).

Because serial communication is so widely used, most microncontrollers have at least one hardware UART peripheral to let most of the handling done by hardware (like buffering, splitting bytes into bits and sending/receiving, adding start/stop bits, handling the parity bit etc.).

\$\endgroup\$
  • 1
    \$\begingroup\$ So, UART is a serial communication protocol and microcontroller may have dedicated hardware circuitry for it. \$\endgroup\$ – Lelouch Yagami Oct 5 '18 at 16:10
  • 1
    \$\begingroup\$ True, most microcontrollers have at least one, some have up to 8 (or maybe even more). \$\endgroup\$ – Michel Keijzers Oct 5 '18 at 16:14
2
\$\begingroup\$

UART/USART is indeed hardware. In fact, before we even begin discussion of terminology here's a popular example from 80s: UART 8250, which is

"...an integrated circuit designed for implementing the interface for serial communications".

If you look through terminology, you'll see hardware elements being referenced. For instance in Microchip presentation 'Using the USART in Asynchronous Mode', you'll notice thing like clock, pins, duplex, and interface mentioned:

USART stands for Universal Synchronous Asynchronous Receiver Transmitter. It is sometimes called the Serial Communications Interface or SCI. Synchronous operation uses a clock and data line while there is no separate clock accompanying the data for Asynchronous transmission. Since there is no clock signal in asynchronous operation, one pin can be used for transmission and another pin can be used for reception. Both transmission and reception can occur at the same time — this is known as full duplex operation. Transmission and reception can be independently enabled. However, when the serial port is enabled, the USART will control both pins and one cannot be used for general purpose I/O when the other is being used for transmission or reception.

Let's now look at TI document 'Interface Circuits for TIA/EIA-232-F':

Looking at the DB9 interface one step back into the digital system, there is, in most cases, a universal asynchronous receiver/transmitter (UART) or asynchronous communication element (ACE). The ACE provides the parallel-to-serial conversion and the necessary start/stop bits, parity-bit generation, and checking for error-free data transmission.

To quote FPGA Prototyping by Verilog Examples: Xilinx Spartan-3 Version:

A universal asynchronous receiver and transmitter(UART) is a circuit that sends parallel data through serial line. UARTs are frequently used in conjunction with the EIA (Electronic Industries Alliance) RS-232 standard, which specifies the electrical, mechanical, functional, and procedural characteristics of two data communication equipment.

And a little further:

A UART includes a transmitter and receiver. The transmitter is essentially a special shift register

Same goes for the description on Wikipedia, they essentially list what hardware elements UART interface should have.


Where does the software aspect come into play ? That's handled by the asynchronous serial protocol itself. The book 'Programming 16-Bit PIC Microcontrollers in C: Learning to Fly the PIC 24' provides very nice introduction in Chapter 8: in aviation you have precise protocol of how and what should be said, who talks first and second, etc., and this is the same for serial communication. Software will control the hardware supplied by UART to transmit - send start bit, the data, then stop bit - and when to listen.

The important bit to notice is that UART doesn't have to be tied to DB-9 connector - UART is not DB-9. You have nowadays Raspberry Pi, Arduino and whole lot of other embedded systems that use just 4 lines of wires. Sometimes there's USB to RS-232 converters. For instance, I've worked with PICDEM PIC18 board which can use either DB-9 or USB for serial communication. Serial data can be sent via Ethernet lines as well.

\$\endgroup\$
0
\$\begingroup\$

It is hardware which -- as the name implies -- includes a physical transmitter and physical receiver. It is not and cannot be a protocol because a protocol is a system of rules (which obviously is not a physical entity).

\$\endgroup\$

Not the answer you're looking for? Browse other questions tagged or ask your own question.