Communication

Communication

Communication in embedded systems refers to the exchange of data between different components, devices, or subsystems within an embedded system. Embedded systems are specialized computing systems designed to perform specific functions or tasks, and they often consist of multiple interconnected components that need to share information.

Communication in embedded systems can take various forms, depending on the requirements of the system and the nature of the devices involved.

Common Aspects

  1. Inter-Component Communication:
    • Embedded systems typically comprise various components, such as microcontrollers, sensors, actuators, memory modules, and communication interfaces.
  2. Sensor-Processor Communication:
    • Sensors are essential components in many embedded systems, providing data about the system’s environment or parameters.
    • Communication between sensors and the processing unit (microcontroller or processor) involves transmitting sensor data to the processor for analysis and decision-making.
  3. Actuator-Control Communication:
    • Actuators are devices that carry out physical actions based on the instructions from the embedded system’s processing unit.
    • Communication from the processing unit to actuators involves sending control signals to trigger specific actions in response to the system’s requirements.
  4. Bus Communication:
    • Many embedded systems use buses (communication channels) to facilitate data transfer between different components.
    • Buses can be parallel or serial, and communication protocols like I2C, SPI, or UART are often used to manage data exchange over these buses.
  5. Wireless Communication:
    • In some embedded systems, wireless communication methods such as Bluetooth, Wi-Fi, or Zigbee may be employed.
    • Wireless communication enables flexibility and mobility in applications like IoT (Internet of Things), where devices need to communicate without physical connections.
  6. Real-Time Communication:
    • Certain embedded systems require real-time communication to meet strict timing constraints.
    • Real-time communication protocols and techniques ensure that data is exchanged within specified time limits, critical for applications like control systems and robotics.
  7. Networked Communication:
    • Embedded systems may be part of larger networks, requiring communication protocols at the network level.
    • Network communication allows embedded systems to share data with other systems, servers, or cloud services.

Selecting the appropriate communication methods and protocols is crucial in designing efficient and reliable embedded systems. The choice depends on factors such as data rate, distance, power consumption, and the specific requirements of the application. Common communication protocols, as mentioned earlier, include UART, I2C, SPI, CAN, Ethernet, and various wireless standards.

Communication methods

  • Synchronous Communication: Based on clock pulse
  • Asynchronous Communication: No clock pulse, based upon the register configuration (Internal clock pulse)

Diff types in Embedded systems are as follows

  • Synchronous Serial Communication Interface: I2C, SPI, SSC and ESSI (Enhanced Synchronous Serial Interface)
  • Asynchronous Serial Communication Interface: UART

Communication methods can segregated as follow in general term

  • Simplex
  • Duplex or Full Duplex
  • Half Duplex

Duplex

  • What is a duplex?: duo – double and plex – part of

Full-duplex communication

What is full-duplex communication?

The transmission of the data in two directions simultaneously.

  • Eg: Telephone communication (Both users can talk at once),
  • Wired communication protocols: SPI, UART,

Half-duplex communication?

What is half-duplex communication?

The transmission of the data in two directions simultaneously.

  • Eg: Walkie-talkie communication (a single user can talk at once, another should wait a minute).
  • Wired communication protocols: I2C, One WIre.

Real-Time Examples

  • Simplex: One-way communications (TV Telecasting), Eg: IR Remote (Only transmit)
  • Half-Duplex, Eg: I2C, One Wire and
  • Full-Duplex, Eg: SPI, UART

Communication Protocol

What is a communication protocol?

In telecommunications, a communications protocol is a system of digital rules for data exchange within or between computers. Communicating systems use well-defined formats (protocol) for exchanging messages. Serial Communication Interfaces (SCI) are RS-232, RS-422, RS-485 etc.


Communication Categories


Type of Communications

Simplex Communication: One-way communication. The receiver can’t resend data back to the transmitter.

Duplex Communication: Two or both-way communication.

  • Half Duplex: Two or both-way communication. But Can’t exchange the data same time. Ex : Like Walkie Talkie.
  • Full Duplex: Two or both-way communication and can exchange data same time. Ex: Like Phone Call.

What is Baud Rate?

  • Baud rate is about how many Bits can be able to transmit/receive within each second.

Wireless Protocol

Wireless Protocols Standards

  • 802.1        –    Inter connection(bridging)
  • 802.2        –    Logical link control
  • 802.3        –    Ethernet(CSMA/CD)LAN
  • 802.4        –    Token bus LAN
  • 802.5        –    Token ring LAN
  • 802.6        –    Metropolitan Area Networks (DQDB)
  • 802.7        –    Broad band TAG
  • 802.8        –    Fiber optic TAG
  • 802.9        –    Isochronous LAN
  • 802.10        –    Security
  • 802.11        –    Wireless LAN/Wi Fi
  • 802.12        –    Demand priority
  • 802.14        –    Cable modem
  • 802.15        –    Wireless personal aread network(PAN)
  • 802.15.1    –    Bluetooth
  • 802.15.3    –    Light rato wireless PAN
  • 802.15.4    –    ZigBee
  • 802.15.6    –    Body area network
  • 802.16        –    Broad band wireless(Wi max)
  • 802.17        –    Resilient Packet Ring
  • 802.18        –    Radio regulatory WG(Mobile broad band wireless access)
  • 802.19        –    Coexistence TAG
  • 802.20        –    Mobile broadband wireless
  • 802.21        –    Media independent handoff
  • 802.22        –    Wireless regional area network

OSI Layers

  • Application (7)
  • Presentation (6)
  • Session (5)
  • Transport (4)
  • Network (3)
  • Data Link (2)
  • Physical  (1)

TCP/IP Layer

  • Application (7,6,5)
  • Transport (4)
  • Internet(3)
  • Network Interface(2,1)

Wired Communication Protocols

Synchronous – Clock signal synchronous

  • I2C
  • SPI

Asynchronous – No Clock signal synchronous

  • UART
  • BSPI
  • CAN
  • EMI
  • ENET
  • 2CUAR
  • I2S
  • Infrared
  • HDLC
  • One-Wire(1 wire)
  • RJ-45
  • RS-232
  • RS-485
  • SSI
  • USB

Networking Protocol

  • TCP/IP
  • HTTP
  • MQTT
  • CoAP

Frequency

What is the frequency? The frequency of a wave the number of waves that pass by each second, and is measured in Hertz (Hz).

  • Eg: 50hz (AC power in India)
  • Sound (450hz).
  • Light()Electromagnetic wave

Types

  • Radio waves.
  • Microwaves.
  • infrared waves.
  • ultraviolet waves.
  • x-rays.
  • gamma rays.

Ethernet Protocol

Pinout Reference

PinDescription10Base-T100Base-T1000Base-T
1Transmit Data+ or BiDirectionalTX+TX+BI_DA+
2Transmit Data- or BiDirectionalTX-TX-BI_DA-
3Receive Data+ or BiDirectionalRX+RX+BI_DB+
4Not connected or BiDirectionaln/cn/cBI_DC+
5Not connected or BiDirectionaln/cn/cBI_DC-
6Receive Data- or BiDirectionalRX-RX-BI_DB-
7Not connected or BiDirectionaln/cn/cBI_DD+
8Not connected or BiDirectionaln/cn/cBI_DD-
Table: Ethernet (RJ45) Pinout – T-568A Standard

Ethernet Frame Formats (IEEE 802.3)

FieldSize (Bytes)Description
Preamble7Synchronization pattern

55h pattern for synchronization between sender & receiver.
Start of Delimiter (SFD)1Marks start of frame

5Dh value, marks start of frame.
Destination Address (DA)6Receiver MAC address. Discards if not matching.
Source Address (SA)6Sender MAC address.
Data Length2Number of bytes in data

Length/Type field: number of data bytes or protocol identifier.
Data46–1500Payload data. If less than 46 bytes, padded to 46 before adding FCS. Max MTU = RXMAXLEN – 18.
Pad0–46 (RXMAXLEN – 18)Padding to meet min length
If data is less than 46 bytes
Checksum (FCS)
Frame Check Sequence
4CRC for error detection. Covers bytes 60–1514 of frame.

Overhead: 22 bytes (before payload starts).

Ethernet TCP & UDP

Common use of Ethernet has reduced the cost of implementation

  •  Ethernet UDP (User Datagram Protocol) and TCP (Transmission Control Protocol) are the basic communication languages or protocols of the internet. They can also be used as communications protocol in private networks.
  • UDP is best suited for applications requiring fast, efficient transmission
  • TCP is a very forgiving protocol when transmission reliability is low, giving it a good reputation for error handling; however, the advantage of error handling limits the speed and synchronous behavior of data exchange
  • What is Different casting Methods.
    • A single host –Unicast = (TCP and UDP)
    • All hosts -Broadcast – (UDP only)
    • A group of hosts – Multicast -(UDP only)
Comparison of different addressing methodsUni-castBroadcastMulticastAnycast
AssociationOne to OneOne to AllOne to ManyOne to one of many
AddressSender and receiver hae unique AddressMAC: FF:FF:FF:FF:FF:FF IP : 255.255.255.255Layer 2 : Least-SIgnificant bit of the first octet IP : Leading address bits of 1110Similar to unicast
Usage ExampleHTTP, SMTP, FTPARP, DHCPUDPDNS
NoteNot Supported in IPV6Not specifically supported in IPV4

Bluetooth Module 

  • Modules
    • HM-10 Bluetooth Module (Texas Instruments CC2541 Chipset)
    • NRF51822 Bluetooth BLE4 2.4GHz Wireless Communication Module
    • HC-05 Bluetooth Module with TTL Output
Please turn AdBlock off, and continue learning

Notice for AdBlock users

Please turn AdBlock off
Index

Discover more from ArunEworld

Subscribe now to keep reading and get access to the full archive.

Continue reading