Embedded systems first originated in the mid-1960's - more than a decade before the first personal home computers and nearly 25 years before the introduction of the internet. One of the earliest applications of an embedded computer system was the Apollo Guidance Computer, introduced in 1966 to support guidance, navigation, and control of the Apollo spacecraft during NASA's lunar missions of that decade. Today, embedded systems are used in a range of industrial, commercial, and residential applications that range from controlling manufacturing systems to enabling vehicle safety features to powering home security systems and smart appliances.
Advancements in the technology of digital telecommunications have led to the development of embedded networking, a practice that expands the range of potential applications for embedded systems in a variety of contexts. The field of embedded networking deals with the network design and topology, hardware devices, and communication/data exchange protocols needed to connect and exchange information between embedded systems.
Embedded systems engineers today have access to a range of wired and wireless communication options for implementing networking capabilities into their embedded systems. Effective design of an embedded networking product requires the selection of a protocol stack that enables the desired networking features and communication patterns while managing design constraints such as memory and power consumption. Embedded systems form the basis for the Internet of Things (IoT), networks of devices whose capabilities depend on internet connectivity.
For engineers that may be new to building networked embedded systems, we offer this basic embedded networking introduction. We'll look at several implementation models for embedded networks and show you how the most common embedded systems have implemented networking to support critical functions and applications in real-world settings.
Our discussion of embedded networking begins with an overview of computer networking systems and how they function. The earliest conceptual model of computer networks was developed by the International Organization for Standardization (ISO) in 1984 and is known as the Open System Interconnection (OSI) model.
The OSI model itself is conceptual in nature - it does not include any actual specifications for network implementation. However, the OSI model does provide a framework for understanding the components of a complete network communication system. As we will see, many of today's most commonly implemented networking technologies use features and protocols that reflect parts of the OSI model.
The OSI model defines a seven-layer architecture for a complete communication system:
The presentation layer is a software layer that formats and encrypts data that will be sent across a network, ensuring compatibility between the transmitting device and the receiving device. The presentation layer includes protocols such as ASCII, JPEG, MPEG.
For data transfer to occur between applications on separate devices, a session must be created. The purpose of the session layer is to manage, synchronize, and terminate connectivity between applications, ensuring coordinated data exchange while minimizing packet loss. The session layer can provide for full-duplex, half-duplex, or simplex communications.
In the OSI model, the transport layer receives messages from the data layer and converts it into smaller units that can be efficiently handled by the network layer. In protocols such as TCP/IP, the transport layer adds a header to each data segment which includes the port of origin and the destination port address - this is called service point addressing. Service point addressing ensures that a message from the transmitting computer goes to the correct port once it arrives at the destination computer. The Transmission Control Protocol (TCP) and User Datagram Protocol (UDP) are popular transport layer protocols for devices that connect to the internet.
The network layer provides the features and functions that transfer data sequences from the host device to a destination device. Along with routing network traffic and reporting delivery errors, the network layer divides outgoing messages into packets and assembles incoming packets into messages. Network layer devices use protocols such as IP, ICMP, and IPX.
Data packets are encoded and decoded into bits in the data link layer, which may be divided into two sub-layers: media access control (MAC) and logical link control (LLC). Hardware network interface controllers are typically assigned a MAC address by the manufacturer that acts as a unique device identifier and network address within a network segment. While the MAC layer supports physical addressing, the LLC layer deals with data synchronization, error checking, and flow control. Protocols for the data link layer include IEEE 802.5/ 802.2, IEEE 802.3/802.2, and the Point-to-point protocol (PPP).
The physical layer defines the electrical and physical requirements for networked devices with control over the transmission and reception of unstructured raw data over the network. The physical data also manages data encoding and the conversion of digital bits into electrical signals. Devices that operate at the physical layer include network interface cards (NICs), repeaters, and hubs.
With the OSI model as a basis, embedded systems engineers have several options for how to implement networking for their embedded devices. Networked systems are designed based on specific application needs and constraints such as cost, power consumption, and memory. Not all embedded systems require all of the functionalities that are expressed in the OSI - it is up to embedded engineers to determine which features are required and to implement suitable protocols from the required layers.
The Control Area Network (CAN) protocol was developed to meet the embedded systems requirements of the automotive industry. CAN is a specification for a serial network that can be used to establish local connections between the microcontrollers in a motor vehicle. The CAN bus protocol is a two-wire, half-duplex system that works well for applications that demand a high-speed transfer of short messages.
The specifications for the CAN bus protocol are described in the international standard ISO 11898:2003. The specification includes requirements for the physical layer and data link layers of the network, leaving individual engineers or manufacturers to implement other high-level protocols of their choosing to satisfy additional networking requirements.
The I2C communications protocol for embedded systems was invented by Philips Semiconductor in 1989. I2C is a two-wire, half-duplex serial communication protocol with a multi-master, multi-slave architecture whose primary application is short range, intra-board communication. Due to the limitations of the I2C protocol's 7-bit address space and the total bus capacitance of 400 pF, serial communication using the I2C protocol is only effective when the connected devices are less than a few meters apart.
I2C implementations include features that correspond to the physical layer, data link layer, and network layer of the OSI network model. The physical layer consists of the physical requirements for transmitting data: two open-collector bus lines where the bus pulls the line low during communication and releases it when idle. I2C features that correspond to the data link layer protocol include bus arbitration and clock stretching - mechanisms for error checking and data flow control. I2C's physical and logical addressing features are typically associated with the network layer of the OSI model.
Embedded devices that connect to local area networks or the internet can be implemented using Ethernet technology. Ethernet connections are often implemented as part of a protocol stack known as the Internet Protocol Suite, sometimes referred to as TCP/IP. The TCP/IP protocol stack includes four layers that are closely analogous to the OSI network model:
Embedded systems engineers have pioneered new protocols with features that are more favorable for operating devices in the IoT. IoT devices come with a range of requirements for size, cost, data transfer rate, serviceability, power, and onboard computing capacity.
While the traditional internet protocol suite is suitable for computers and some types of embedded systems, some of its protocols are not useful for the requirements of many devices in the IoT. Protocols like XML, HTTP, TCP, and IPv6 produce a large data overhead with each transmission that can be inefficient for smaller data transfers that frequently characterize IoT devices. New communication protocols such as MQTT, LoRa, SIGFOX, Weightless, WirelessHART, Zigbee, 6LoWPAN, and DTLS are being used to provide more efficient web-based communications while limiting data overhead for IoT devices.
The greatest challenge for embedded networking with IoT devices is anticipating which standards and technology will remain relevant in the future.
Embedded networking presents a unique challenge for engineers, whether the application entails networking microcontrollers with each other in a closed system or implementing a physical ethernet connection to support LAN, WAN, or internet connectivity. To succeed, developers must be familiar with the basic functioning of computer networks and effectively adapt this knowledge to account for the application-specific device requirements and limitations associated with their embedded system.
With the OSI model as a foundation, embedded engineers can better understand the features required to support network connectivity and adopt a protocol stack for their devices that suits its unique functions and requirements.
Total Phase empowers embedded engineers with the diagnostic tools they need to successfully implement embedded networking with I2C and CAN bus along with other leading protocols. With our high-performance bus monitoring tools, product engineers can debug their embedded networking implementations more quickly, reducing overall time-to-market.
Ready to learn more?