Asynchronous vs Synchronous Protocols

Motivation

Protocols can either be synchronous or asynchronous. There are significant advantages to both in specific situations, and the requirements typically dictate when each is better.

Synchronous Protocols

Synchronous protocols (i.e. SPI, USART) mean that alongside serial data on a data line, there is also a clock signal sent alongside it. What this means is that for any synchronous protocols, the data is typically sent out at either the rising or falling edge of a clock signal, meaning that the speed of the data transfer is dictated by the clock frequency.

Timing diagram for a synchronous protocol

Asynchronous Protocols

Unlike synchronous protocols, async protocols do not rely on a clock signal to determine how fast the data is sent. The question then to be asked is - how can you determine how fast data is sent over an async protocol such as UART or CAN? The answer is quite simple - you set the speed of communication for all devices, and make all devices transmit or receive data at this speed. An async protocol typically has a definition that details when a device starts transmitting and a device stops transmitting (in this case, when the line is pulled low). The general principle is that you typically sample each bit at the predetermined period. A common error is that if you do not set the sample rate properly or if your clock’s accuracy is not good enough, it may sample the wrong bits and thus won’t be able to work properly.

Timing diagram for an asynchronous protocol, credit: https://www.allaboutcircuits.com/technical-articles/back-to-basics-the-universal-asynchronous-receiver-transmitter-uart/

Comparison

Async Protocol

Sync Protocol

Async Protocol

Sync Protocol

Can be implemented in fewer wires

Requires a separate wire for clock/timing

Requires an accurate clock to operate

Does not require an accurate clock to operate

Requires more bits to confirm start/stop

Does not require start/stop bits

Slower compared to a sync protocol

Faster compared to an async protocol