Week 11
Assignment: Networking and Communications
Individual assignment
design, build, and connect wired or wireless node(s) with network or bus addresses and local input &/or output device(s)
What is a Communication Protocol?
In embedded systems, a communication protocol is a standardized method that devices use to exchange data. Protocols define the rules for data formatting, timing, transmission, and error-checking to ensure seamless communication between microcontrollers, sensors, actuators, or other systems.
Protocol Categories
Protocols can be categorized into:
- Wired Communication Protocols – Use physical connections like cables or PCB traces (e.g., UART, I2C, SPI).
- Wireless Communication Protocols – Use radio frequency or electromagnetic signals (e.g., WiFi, Bluetooth).

Types of Communication Protocols in Embedded Systems
Communication protocols allow embedded devices to exchange data reliably with other devices. These protocols fall into three major categories:
1. Wired Communication Protocols
These use physical cables or PCB traces to transfer data. They are reliable, fast, and widely used in embedded hardware.
UART (Universal Asynchronous Receiver/Transmitter)
- Type: Point-to-point, asynchronous
- Wires: TX (Transmit), RX (Receive)
- Features: Simple serial communication, doesn't require clock signal, commonly used for debugging or device-to-device communication
- Example Uses: GPS modules, GSM, Bluetooth modules (HC-05), debug output
I2C (Inter-Integrated Circuit)
- Type: Multi-master, multi-slave, synchronous
- Wires: SDA (Data), SCL (Clock)
- Features: Can connect many devices with just two wires, each device has a unique address
- Example Uses: Accelerometers, temperature sensors, OLED displays
SPI (Serial Peripheral Interface)
- Type: Full-duplex, synchronous
- Wires: MISO, MOSI, SCLK, SS (Slave Select)
- Features: Faster than I2C, requires more wires, Master-Slave architecture
- Example Uses: SD cards, displays, high-speed sensors
CAN (Controller Area Network)
- Type: Multi-master, message-based
- Wires: CAN High, CAN Low
- Features: Used in automotive and industrial applications, robust and fault-tolerant
- Example Uses: Car ECUs, industrial machines
RS-232 / RS-485
- Type: Serial communication standards
- RS-232: Single-ended, used for point-to-point
- RS-485: Differential, supports multiple devices on one bus
- Example Uses: Industrial automation, long-distance serial communication
Learn more

2. Wireless Communication Protocols
These use electromagnetic waves to transmit data without physical connections.
WiFi (IEEE 802.11)
- Range: 30–100 meters
- Speed: High data rate
- Features: Internet access, peer-to-peer or cloud communication
- Example Uses: IoT devices, cloud logging, smart home products
Bluetooth / Bluetooth Low Energy (BLE)
- Range: ~10 meters (BLE can go more)
- Power: BLE is optimized for low power
- Features: Device pairing, short-range wireless control
- Example Uses: Fitness bands, wireless sensors, mobile apps
LoRa (Long Range)
- Range: Several kilometers
- Speed: Low data rate
- Features: Ultra-long-range communication, low power
- Example Uses: Remote environmental monitoring, smart agriculture
Zigbee
- Range: 10–100 meters
- Features: Mesh networking, low power
- Example Uses: Home automation, smart lighting
NFC (Near Field Communication)
- Range: ~4 cm
- Features: Short-distance communication, touch-to-connect interface
- Example Uses: Contactless payments, ID cards

3. Network Communication Protocols (Higher-Level)
These define how data is formatted and transmitted over wired/wireless systems.
HTTP / HTTPS (HyperText Transfer Protocol)
- Used in web communication
- Often used with WiFi modules to send data to web servers
MQTT (Message Queuing Telemetry Transport)
- Lightweight protocol for IoT
- Publish/Subscribe model
- Works well on low-bandwidth, high-latency networks
CoAP (Constrained Application Protocol)
- Similar to HTTP but for constrained devices
- Used in low-power IoT environments
WebSocket
- Full-duplex communication over a single TCP connection
- Used for real-time web applications and IoT dashboards
