Parallel Vs Serial Communications

Contents

Introduction

Broadly speaking there are two different approaches to facilitate hardwired communications between two electronic devices: parallel and serial. This posting will not be considering wireless communications.

Both forms of communication have a long history. They are concerned with the transmission of the smallest piece of digital information - the bit - across a wire between both devices.

A bit can only have one of two possible values; 0 or 1. Considering the physical layer, bits can be transmitted as either a HIGH value (e.g. 3.3V) representing a 1 or a LOW value (e.g. 0V) representing a 0.

This simple HIGH/LOW voltage method of transmitting bits means that it is easy to see the resultant square wave form on an oscilloscope.

Transmission of bits with high/low voltages
Fig 1 - transmission of bits

Almost always more than a single bit needs to be transmitted from one device to a receiving device. Multiple bits can be transmitted simultaneously across parallel wires or sequentially on a single wire. What this looks like, with advantages and disadvantages of both approaches, is discussed in the sections following.

Parallel Communications

In parallel communications a series of bits are transmitted simultaneously across parallel cables or channels. Usually 8-bits making a byte are sent as a group. This is best shown with a diagram.

Parallel transmission of 8 bits
Fig 2[1] - parallel transmission of a byte

On each clock (CLK) pulse all eight bits are simultaneously sent. The receiver is responsible for assembling the bits into their correct order.

Parallel communication was once widely used in consumer level devices such as printers, scanners and hard drives but has largely been replaced by cheaper serial technology - especially since the popularity of USB (Universal Serial Bus) with its plug'n'play philosophy has developed and grown.

However parallel technologies are still in use where high data rates are required such as large shop printers and internal computer buses.

Serial Communications

Serial communication involves data transmission of each bit across a single cable or channel. The bits are sent as a serial stream, one after the other.

Serial transmission of 8 bits shown at the physical layer level
Fig 3[2] - serial transmission at the physical layer

Both the transmitter and receiver must agree on the number of data bits (the data frame) that will be transmitted per packet - 5 to 9 bits but most commonly 8 bits. The data transmission rate (baud rate usually expressed in  bytes/sec,  Kbytes/sec  or  Mbytes/sec) must also be agreed.

UART serial transmission of an 8 bit data packet
Fig 4[2] - UART serial packet transmission

The transmitter initiates the transmission by sending a start bit  which advises the receiver that a packet is about to be sent. After the data frame  has been sent, an optional error check (parity bit) may be sent. The transmitter will then send a stop bit indicating end of transmission. If there is more data to be sent then the process will be repeated.

Serial communication:

  • Requires fewer wires
  • Has simpler hardware
  • Lower implementation cost
  • Is the preferred solution for telecommunication networks

Serial communication disadvantages include:

  • Can be much slower than parallel transmissions
  • Extra control bits (non-data) need to be transmitted
  • Higher processing overheads

Microcontrollers with their limited numbers of external GPIO pins almost exclusively communicate with their peripherals via a serial protocol. In cases where the nature of the external device dictates that parallel communication must be used the peripheral will often have an onboard controller chip that converts parallel data streams to serial streams and vice versa.

Good examples are display devices (e.g. 7-segment LED and LCD1602 displays) where the microcontroller is able to write screen data with a serial protocol to screens requiring a parallel data stream via an onboard controller chip on the display.

The microbit module provides access to three popular serial hardware/protocol industry standards: UART,  I2C and SPI.

The above discussion on serial transmission specifically describes UART in basic terms. Meanwhile I2C and SPI also transmit their data bits in a serial sequence they have different start/stop and timing mechanisms.

UART is an asynchronous serial protocol where each connected device must maintain their own clock and transmission can be initiated by either device at anytime.

SPI and I2C are synchronous serial protocols where one device provides the clock signals and initiates transmission.