Notes / Communication Protocols
Serial communication basics: synchronous, asynchronous, duplex, differential
Before memorising protocol names, fix four criteria in your head. UART, SPI, I2C and CAN then fit into one table.
Four criteria
| Criterion | Options | Meaning |
|---|---|---|
| Clock | Synchronous / asynchronous | Is a clock line sent along, or is the speed agreed in advance? |
| Direction | Full duplex / half duplex | Send and receive at once, or take turns? |
| Signal | Single-ended / differential | One wire referenced to ground, or the difference between two wires? |
| Topology | 1:1 / bus | Only two connected, or several sharing a line? |
In one table
| Protocol | Clock | Direction | Signal | Topology |
|---|---|---|---|---|
| UART | Asynchronous | Full duplex | Single-ended | 1:1 |
| SPI | Synchronous | Full duplex | Single-ended | 1:N (selected by CS) |
| I2C | Synchronous | Half duplex | Single-ended (open-drain) | Bus (addresses) |
| RS-485 | Asynchronous | Half duplex | Differential | Bus |
| CAN | Asynchronous | Half duplex | Differential | Bus (ID arbitration) |
Why serial
Parallel communication, which sends several bits at once, needs many wires, and at high speed the arrival time differs from wire to wire. Serial communication, which sends bits one at a time over a few wires, became the standard for connecting boards and chips.
Differential signals
Opposite signals are sent on two wires and only the difference is read. External noise enters both wires equally and disappears in the difference. That is why noisy, long-distance environments such as vehicles and factories use differential links like CAN and RS-485.