Communication protocols define rules in the digital world. On the Internet, the formation of these protocols can be handled by various groups, such as the WWW (World Wide Web) or the W3C and the IETF (Internet Engineering Task Force) which help provide worldwide services and limit different types of liability and vulnerabilities. When HTTP turns into HTTPS, the communication protocol plays an important role, or else the use of SSL (Secure Sockets Layer) certificates becomes the standard. The other types of protocols use data packets within global network routes, and sometimes they look like particle physics. Since technology is advancing every day, different communication protocols are being used in advanced networks. Connecting a wide range of devices to a universal network is the aim of the Internet of Things (IoT). This article examines embedded systems communication protocols.
Communication protocols are the proper descriptions of digital message formats as well as rules. Messages are exchanged between computer systems using these protocols. Telecommunications systems rely on these to send and receive messages consistently. These protocols cover error detection, correction, and signaling. They can also explain semantics, syntax, and link analog and digital communications.
Both hardware and software can implement these protocols. So there are a thousand types of communication protocols that are used all over in analog and digital communication, and so computer networks cannot function without them.
By transmitting digital signals and analog signals, different files, and the data from one device to another, communication protocols allow varied networks devices to converse with each other. Protocols of this type can be found in telecommunication & computer networks where appropriate rules are applied to transmit information from source to destination. The most vital protocols within networking are TCP (Transmission Control Protocol) & User datagram protocol (UDP).
There are two types of communication protocols which are classified below:
A communication protocol used between two different devices. Microcontroller kit to computer communication, for example. It's done via an inter bus system.
The different categories of intersystem protocol mainly include the following.
The UART acronym stands for Universal Asynchronous Receiver and Transmitter. This is a wired serial communication protocol. The signal lines are Rx and Tx on the cable. Serial communication is used to send and receive the signal. No pulses are used in the data transmission. Bytes of data are transmitted sequentially from the UART.
The UART operates in half-duplex mode. In half-duplex mode, data is transferred and received, but not at the same time. Many controllers have hardware UARTs. A single data line is used to transmit and receive data. The 8-bit data transfer is high to low and has one start bit, eight bits of data, and a stop bit.
Ex: Emails, SMS, Walkie-talkie.
A USART is a universal synchronous and asynchronous transmitter and receiver. Two-wire serial communication is used. Rx and Tx are the signal lines on a data cable. In this protocol, data is transmitted and received byte by byte along with clock pulses. It is a full-duplex protocol, which means that it is capable of transmitting and receiving data at different rates at the same time. This protocol is used by various devices to communicate with microcontrollers.
Ex:-Telecommunications.
refers to the Universal Serial Bus. This is another serial communication protocol. D+ and D- are the cable signal lines. The USB protocol is used to communicate with system peripherals. USB communication uses driver software that is based on the functionality of the system. USB devices can communicate on the bus without requesting data from the host computer.
Today, most devices communicate with USB protocol by using this technique. An example is a computer communicating with an ARM controller through USB. A USB connection can transfer data in different speeds - slow speed mode (10kbps to 100kbps); full speed mode (500kbps to 10mbps); and high speed mode (25mbps to 400 Mbps). The maximum cable length is 4 meters with a USB connection.
Ex: Mouse, Keyboard, Hubs, switches, pen drive.
The intersystem protocols mainly include UART, USART, and USB
UART | USART | USB |
The term UART stands for Universal Asynchronous Transmitter and Receiver | The term USART stands for Universal Synchronous and Asynchronous Data Transmitter and Receiver | The term USB stands for Universal Serial Bus |
UART mainly includes two wire-based protocols like transmitter and receiver | USART is a two-wire protocol like Transmitter and Receiver | USB is a two-wire protocol like D+ & D- |
It transmits as well as receives pockets of data by byte without classes pulse | It transmits and receives a block of data through classes pulses | It transmits and receives the data through clock pulses |
UART is a half-duplex communication | USART is a full-duplex communication | USB is also full-duplex communication |
UART is slow as compared to USART | USART is slow as compared to USB | It is fast as compared to USART and UART |
Intra system protocol is used to communicate between the two devices on the circuit board. We can expand the peripherals of the microcontroller without resorting to intra-system protocols with these intra-system protocols. Intersystem protocols are more complex and consume more power. Within intra-system protocols, circuit complexity and power consumption are reduced to reduce access costs and improve security.
The different categories of intrasystem protocol mainly include the following.
All peripherals are connected to the microcontroller via only two wires, referred to as inter-integrated circuits or I2C. To communicate between devices, I2C uses two wires: SDA (serial data line) and SCL (serial clock line). The protocol is master-slave in nature. Each slave is assigned an address. The master device sends the address of the target slave device and reads/writes its flag. All slave devices that are on match the address, the remaining slave devices are disabled.
When the address is matched, communication between the master and slave device occurs, and data is transmitted and received. The transmitter sends 8 bits of data, and the receiver replies with 1 bit of acknowledgement. When the communication is complete, the master issues the stop condition. Phillips Semiconductor developed the I2C bus. Its original purpose was to provide an easy interface between CPUs and peripheral chips.
Embedded systems typically connect peripherals to the microcontroller as memory-mapped devices. I2C requires only two wires for connecting all the peripherals to the microcontroller. These active wires, called SDA and SCL, are both bidirectional. SDA line is a serial data line and the SCA line is a serial clock line.
I2C Pull-up Resistors
Why given the pull-up resistors in I2C SCL and SDA line.
SPI refers to the serial peripheral interface. Motorola developed it as a serial communication protocol. The protocol is sometimes called the 4-wire protocol. The master and slave devices are communicated with MOSI, MISO, SS, and SCLK.SPI protocol is used. A frequency is set up by the master first.
By pulling the chip select button, the master selects the specific slave device for communication. Selecting that particular device initiates communication between the master and slave. Only one slave can be selected at a time. This is a full-duplex protocol. Bit transfer is not limited to 8-bit words.
refers to controller area networks. The protocol uses serial communication. There are two wires required, CAN high (H+) and CAN low (H-). The Robert Bosh company developed it for in-vehicle networks in 1985. The protocol is based on message-oriented transmission.
Intersystem protocols include I2C, SPI, and CAN
I2C | SPI | CAN |
I2C is an inter-integrated circuit | SPI stands for serial peripheral interface | The CAN stands for controller area network |
It is implemented by Philips | SPI is developed by Motorola | CAN is developed by Bosch |
I2C is a half-duplex protocol | SPI is a full-duplex protocol | CAN is a full-duplex protocol |
Synchronization | Synchronization | Synchronization |
It is a two-wire protocol like SCL & SDL | It is a four-wire protocol like SCL, MISO, MOSI & SS | It is a two-wire protocol like CANH+ and CAN H- |
It is a multi-master protocol | It is a single master protocol | It is a multi-master protocol |
It is used in the circuit board | It is used in the circuit board | It is used in two circuit board |
communication. IoT devices are more susceptible to attacks. By using the correct protocols, these security gaps can be closed. A communication protocol in IoT is a way to ensure the privacy of data being exchanged among IoT devices by ensuring the highest level of security.
If these devices are connected through an IP network, otherwise through a non-IP network, there is a disparity between their power, range, & memory. While the range is not a problem, the connection is difficult over IP networks and requires huge amounts of memory and power from these devices. Alternatively, Bluetooth, which is a non-IP network, requires less power and memory, but has limited range.
High quality, credibility, interoperability, innovation flexibility & global scalability are the main advantages of IoT communication protocols. Basically, IoT protocols can be divided into two categories: IoT data protocols and IoT network protocols.
The list of Top 10 IoT Communication Protocols includes the following.
Data communication protocols are very important in communicating because they are used to understand networks, computers, or devices.
Protocols of this type rely on typical rules and methods, such as a common language, to communicate with computers or networks. To send an e-mail, a user would create the message on his personal computer by including the details as well as the message and attachments.
Multiple actions can occur immediately after the user sends the email in order for the recipient to receive it. The email is sent over the network and reaches the recipient. The protocols indicate how the note should be enclosed, how the receiver computer should verify for errors, etc.
There are several primary communication protocols used by the PLC as well as other connections of the network which are supported by different PLC software products. Based on the three basic factors of baud rate, network length, and node count, these protocols can be classified. PLC communication protocols include the following.
Once PLC modules are connected over a network, the standard protocols are used. There are different types of protocols that support different speeds, distances & the number of connected devices.
Several communication protocols are supported by the cloud, including MQTT and HTTP. Cloud IoT Core can communicate with these devices through a bridge over HTTP or MQTT. Cloud IoT Core is comprised of these bridges. After you create a registry of a device, you can select protocols such as HTTP, MQTT, etc. Standard protocols like MQTT are frequently used and supported by embedded devices. MQTT is commonly used in machine-to-machine communication.
The cloud IoT core is not connected to devices via HTTP as it is a connectionless protocol. Instead, it sends requests and receives responses. In cloud computing, protocols are rules that enable two electronic elements to communicate and exchange information. Communication, storage, encryption, networks, decryption, security, and management of user logins are all done using it. A few examples include
The purpose of this article is to provide an overview of communication protocols, types, and differences between inter-system protocol and intrasystem protocol. Let me ask you a question, what are Arduino communication protocols?
Communication protocols have a special place in embedded systems because they provide an efficient means of exchanging data among devices. There are a lot of protocols in the embedded world, but there are a few that are used more than the others. A poll was conducted across embedded engineering communities across the Internet and a list of seven communication protocols that are so popular and well worth learning about was compiled.
In order to establish communication, SPI uses a master-slave configuration. This protocol was invented by Motorola in 1980. SPI is used in microcontrollers with EEPROMs, LCD displays, etc.
SPI protocol comprises of four pins:
Additional SS pins are necessary when master device needs to control more than one slaves. One master can control multiple slaves. SPI protocol supports high speed data transfer with bus speed typically stand around 50Mhz therefore the data transmission speed can be go up to 50Mbps.
In order to send data to the slave, the master must select the slave using the Slave Select pin by activating a low input signal. To synchronize the transmission, a clock pulse is sent from the SCLK pin to the slave. Master pin data passes through MOSI pin, and slave data passes through MISO pin
Philips Semiconductors invented I2C in 1982 as a two wire serial bus communication protocol. Two-wire communication interface commonly used in embedded systems to connect low-speed devices such as microcontrollers, A/D and D/A converters, I/O devices, and other peripherals.
I2C uses two pins to establish communication:
According to their mode of operation, I2C protocol supports different data speeds. The data transfer speed is 100 kbit/s when operating in standard mode, and 400 kbit/s when operating in full speed mode.
The I2C protocol assigns a unique address to each device. When a master wishes to transfer data to a slave, it sends the address of the slave device through the SDA pin to which the message is addressed. Only the slave with the specified address will accept the incoming data.
USART is a serial communication protocol developed by Digital Equipment Corporation in the 1960s. Simplexes, 1/2 duplexes and full duplexes are supported by USART. This is one of the most popular protocols, and almost all microcontrollers will support it
The communication in UART takes place through two pins.
Data transmission in USART takes place by means of data packets which usually consists of 8 data bits, start bits and parity bit to perform error correction.
Data in USART will be sent as data packets or data frames, as mentioned above. The data frame starts with a start bit, followed by data bits, parity bits, and a stop bit. The composition of the data frame can be configured on most microcontrollers by configuring the number of data bits.
A controller area network, or CAN protocol, aims to reduce the complexity of connectivity and wiring by sharing data among multiple interfaces. Communication between different parts of automobiles like engines, bakes, air conditioners, etc. was first developed and used in automobiles to reduce the amount of wiring in them. The CAN protocol has the unique feature that data transmitted from one node will be available to all nodes connected to the CAN bus.
The protocol uses two wires to communicate with other CAN devices.
There are two types of CAN protocols: Standard CAN and Extended CAN.
Standard CAN allows any node to send data to any other node. CAN data frames begin with a start bit followed by an 11 bit identifier that determines the message's priority. Messages with higher priority gain access to the CAN bus when two devices send messages at the same time. The RTR bit indicates whether the data is being requested from a particular node. The IDE bit indicates whether it is a standard or extended CAN frame. The data length code bit follows IDE. The message follows. Next, a circular redundancy check and an ACK bit are used for error checking. The message ends with a seven-bit end of frame.
This is one of the most popular and widely used communication protocols. However, despite having different hardware types and standards, embedded systems consider it versatile and effective. During USB communication, data transfers are initiated by the host device through polling. Connecting to a host requires a device to assign an address and use this address to transfer data.
USB protocol uses below pins to function
An USB connection uses data packets to transmit data. Generally, a data packet consists of three components: a token packet that carries data type and device address information. Next is the datapacket containing the actual data to be transferred, followed by an End of Packet (EOP) signal.
From LAN to WAN, Ethernet is the most popular networking protocol. The Internet of Things has made this protocol indispensable in embedded systems. A series of revisions to this communication protocol has been made over the years to enhance its connectivity and speed. To enable Ethernet connectivity, Ethernet controller chips like the WZ1500 are used with regular microcontrollers. Nevertheless, some high-end microcontrollers, such as STM32, may come with some inbuilt Ethernet support. For data transmission and reception within a network, these microcontrollers use MII or RMII protocols. See Ethernet protocol for more information.
Frames are used to transmit data in Ethernet protocol. The data frame consists of the sender's address, the receiver's address, the actual data, and bits for error correction.
Microcontrollers and external peripherals can also be connected via the RS-485 protocol. When data must be transmitted over hundreds of meters, this protocol comes in handy. As with Ethernet, most microcontrollers use external chips like MAX485 to implement this protocol. Several devices can exchange data using this protocol. Click here for more information about RS-485. This is the RS-485 pinout.
There are four bits in a typical RS-485 data frame: the start bit, the receiver address, and the data bits.
Thank you for reading. The second part will be published shortly. If you have any feedback, comments or suggestions do use the comment box below.