Embedded systems are found in various areas of daily life, such as GPS systems and fitness trackers. For these systems to function as intended, embedded engineers need to ensure that communication protocols have been set up within the system and that those protocols are followed.
Today, there is a list of communication protocols in embedded systems that embedded engineers should consider and be aware of, each having its own qualities and application usage. Knowing the functions of each protocol bids for more informed decisions when building embedded systems.
Here we discuss what communication protocols are, why they’re important, as well as the four types of communication protocols embedded engineers should understand. So, let’s jump in!
Communication Protocols are a system of rules and digital message formats enabling the transmission of information between devices.
To explain the process, in short, two-way communication exchange is controlled by a set of rules that enable data to be transferred between devices to send and receive messages.
Communication protocols play a significant role in allowing different devices to communicate and transmit information to each other.
In Embedded Systems, Communication Protocols are vital in the function of devices. Like wireless devices, embedded devices need to talk to each other in order to share useful data.
This communication typically follows a Master-Slave protocol exchange, where Masters (Microprocessors) command data transmission to and from Slaves (Sensors).
Here, we discuss four types of communication protocols, UART, SPI, I2C and USB, as well as their pros and cons.
UART stands for Universal Asynchronous Receiver Transmitter (UART) and is perhaps the most simplified, oldest and most commonly used form of device-to-device communication.
As the name implies, UART uses asynchronous serial communication, which means that no clock signal is used to synchronise data between the transmitter and receiving devices. So, unlike the majority of protocols, UART data transmission follows TX-RX/Transmitter/receiver pin communication connected through two wires.
UART adds stop and start bits to detect incoming data. Here, device communication speed must follow around the same baud rate configuration in beats per second (bps) to send and receive data transmission packets.
UART can be configured in three distinct ways:
SPI refers to Serial Peripheral Interface and is a famous communication protocol within the embedded world. The SPI protocol is used across a range of chipsets, including SD card and RFID card reader modules. Its essential function as an interface Bus is to send/receive data across Microcontrollers (Master) and Peripherals such as sensors and SD cards (Slaves) to assist device communication.
SPI follows a Serial Communication Protocol with a Full-Duplex configuration, meaning data bits can be transmitted continuously in both directions at the same time through Master-Slave-IN/ Master-Slave-Out (MOSI/MISO) exchange.
This holds an advantage over stop/start bit communication, as devices can function without interruption. The overall operation of SPI involves four signals.
Though SPI holds a higher transfer rate than other multi-slave systems, the one Master to multiple-slave nature of SPI means it is not scalable as multiple wire interfaces are needed to establish Master/Slave transmission amongst the Bus. This should be held as a consideration when contemplating the complexity of a system.
I2C means Intern-Integrated Circuit and was first created by Phillips to power electrical lighting. I2C communication is popular due to its Multi-Master-Multi-Slave structure, otherwise known as an I2C Bus. Such structure is valuable when registering multiple Microcontrollers data to power a device system.
I2C has varying applications, particularly in IC circuits like LCD Modules, Temperatures Sensors, and Data Acquisition, etc., making it a common Protocol used by embedded engineers.
The I2C communication protocol follows a Half-Duplex configuration, which means data can be transferred bit by bit via two-way communication at a single time. This should be taken into consideration when contemplating integration, as data communication happens at a lower rate.
Like SPI and UART, I2C follows a Serial Communication Protocol enabling two-wire interface communication between masters and slaves. Having a less complex pin structure, I2C is attractive to integrate.
In an I2C Bus, Multiple Master and Salve device communication works via Synchronous Communication, where a clock signal controlled by the master is distributed amongst the salve nodes across two-wire interfaces, the Serial Clock Line (SCL) and Serial Data Line (SDA). When integrating I2C use cases need to be evaluated as it is more complex than most other Protocols.
USB refers to Universal Serial Bus and follows an Inter-System Protocol, which communicates between two devices. Prominent in the Computer electronic device world, USB has become popular over UART Protocols.
USB follows an Asynchronous Serial Protocol where no clock signal is needed, making it a low-cost device. When the host device is sent communication, data transmission is relayed to a receiving endpoint device via data packets. USB can entail a range of speeds depending on the use case, from 1.5MBS to 10GBS.
Communication protocols play an important function in embedded systems, allowing different devices to communicate and transfer information with one another. Embedded engineers have various types of communication protocols to choose from.
The four communication protocols most commonly used and essential for any embedded engineer to know include UART, SPI, I2C and USB. To discover more on the latest trends in embedded protocols, check out 5V Tech.