Arduino

Is Arduino UART or USART

Arduino is an electronic development board used to communicate and interface with multiple hardware and sensors. To build this communication between Arduino and other devices we need a protocol that allows Arduino to transfer and receive data. Arduino have multiple protocols like SPI, I2C and USART/UART. Here we will discuss how USART and UART are used in serial communication between Arduino and hardware.

Is Arduino UART or USART?

As per the datasheet Arduino is a USART device. Arduino uses USART for serial communication among devices. One serial port USART is mandatory in all Arduino boards however some have several. USART is not only a communication protocol, it is a hardware circuitry inside an Arduino board. Main purpose of USART is to transmit and receive data serially from Arduino to any other device.

Another important point to note is between USART and UART, there is only the difference of letter S which means Synchronous. USART stands for Universal Synchronous/Asynchronous Receiver/Transmitter while UART stands for Universal Asynchronous Receiver/Transmitter, so the major difference is USART supports both synchronous and asynchronous communication while UART only supports asynchronous communication. USART can function as UART, but UART cannot work as USART.

To get a better understanding of both first we need to highlight the difference between synchronous and asynchronous.

What Is Synchronous and Asynchronous Communication

Transmission is the mode of transferring data from one place to another. In Arduino we called this transmission of data as serial communication. Mainly two types of serial communication take place in devices:

Synchronous Communication

Synchronous transmission of data is a type of communication in which a stream or block of data is transferred from source to destination. This data signal is accompanied by a timing signal known as clock and synchronization between sender and receiver is compulsory. It is a full duplex transmission and more efficient for large amounts of data transfer.

Asynchronous Communication

Asynchronous transmission transfers data in the form of byte. Sender and receiver do not require any synchronization. It is half-duplex transmission, start and stop bits are added with transmitted data. It does not need any clock for synchronization. Data is of 8 bits with additional 2 bits of stop and start, so the total number of bits sent with a character is 10.

Difference between UART and USART

Both USART and UART are microcontroller peripherals which convert data into serial bit streams. A UART can add parity bits along with start and stop bits to the data stream which helps in determining error. USART can do the same, but it has addition of synchronous communication which UART lacks. It seems like USART and UART are the same but no, both have some meaningful differences otherwise why would we name them differently. Let’s see how both are different in working.

First difference between UART and USART is the way in which data is clocked. UART uses the start bit to synchronize the data stream with the internally generated data clock inside the microcontroller. There is no incoming clock signal with data stream, and to properly receive data UART must know baud rate before the data is reached.

On the other hand, USART has the advantage of synchronization. When data is being sent by Sending peripherals a clock is also generated along with it which will help the destination side to receive data without knowing baud rate ahead of time. A separate clock line is used in USART which will increase data transmission rate up to many times as compared to UART.

Second difference between UART and USART is the number of protocols both can support. UART has very limited options with start, stop and even odd parity bits. UART is simple and offers limited options from its base format. While USART is more complex in nature and supports multiple protocols to name a few such as Smart card, RS-485 interfaces, Modbus, and multiple other modules. As already mentioned, USART has the same Asynchronous capabilities as UART, it can generate the same data as UART can.

Here is a brief comparison between UART and USART to give a better idea about them.

USART UART
USART is half duplex + full duplex UART is full duplex
USART is faster than UART UART data transfer is slow
Data is transferred in blocks One byte is transmitted at a time
USART can also work as UART UART cannot function like USART
USART is more complex UART is simple and easy to handle
Clock signal is sent with data receiver don’t need to know baud rate ahead of time Receiver should know baud rate to receive data
Data is transmitted at defined baud rate Data is transmitted at variable speed

How to Use UART/USART Communication in Arduino

To establish serial communication between Arduino and other devices we need two pins known as Tx and Rx pins, Tx is for data transmission and Rx is for receiving. All Arduino boards have at least one port or these two pins for serial communication. In Arduino Uno Tx is at D1 and Rx is at D0 pin.

To transmit data serially we need to connect the Tx pin Arduino with the Rx pin of the receiving module or hardware and similarly Rx pin of Arduino to Tx pin of another device. The USB port on Arduino is also used for serial communication but an important thing to note is Arduino Uno does not allow simultaneous communication over Tx/Rx pins and serial port.

Conclusion

Serial communication is a faster way of communicating among devices in this modern world, all the microcontrollers designed come with USART to make communication possible. Here we highlighted all the potential differences among Arduino USART and UART. Further we discussed Arduino pins for serial communication. So, the conclusion to all this discussion is Arduino is a USART device, but it can work like UART as well.

About the author

Kashif

I am an Electrical Engineer. I love to write about electronics. I am passionate about writing and sharing new ideas related to emerging technologies in the field of electronics.