Key Engineering Takeaways
- •Use SPI for high-bandwidth sensors (IMUs at 1kHz+, TFT displays, SD cards).
- •Use I2C for low-speed configuration registers and short on-board interconnects (<30cm).
- •Convert UART to differential RS-485 for long robotic arm cable harnesses to reject electromagnetic motor noise.
Prerequisites
- • Digital logic voltages
Protocol Architecture Comparison
| Feature | UART | I2C | SPI | RS-485 |
| :--- | :--- | :--- | :--- | :--- |
| **Wires Required** | 2 (TX, RX) + GND | 2 (SDA, SCL) + GND | 4 (MOSI, MISO, SCK, CS) | 2 (A, B differential) |
| **Typical Max Speed** | 115.2 kbps - 3 Mbps | 100 kHz - 3.4 MHz | 10 MHz - 80 MHz | 10 Mbps |
| **Topology** | Point-to-point | Multi-drop (up to 127) | Master-multi-slave | Multi-drop (up to 32/256) |
| **Max Cable Length** | ~2 meters | ~0.5 meters | ~0.3 meters | ~1200 meters |
Tags:#UART#SPI#I2C#RS485#Serial Communication#Protocols