All courses › Embedded Systems and Instrumentation › Serial Communication

Serial Communication

UART, SPI and I2C are the most common serial protocols between a microcontroller and external devices. UART is asynchronous with no shared clock and uses start and stop bits; SPI is synchronous with a shared clock and no start/stop bits; I2C uses just two lines with open-drain outputs and requires pull-up resistors.

SPI bytes/s=fSCK8\text{SPI bytes/s}=\dfrac{f_{SCK}}{8}throughput for SPI (no start/stop bits)

Symbols

fSCKf_{SCK}clock frequency of the SPI busHz

Example

SPI clock 11 MHz:

Throughput =106/8=125 000=10^6/8=125\,000 bytes/s.

UART has start and stop bits, SPI and I2C normally do not – count the right number of bits per transfer.
Practise microcontrollers for free →

← PWM · Accuracy and Precision →

Part of Embedded Systems and Instrumentation: Microcontrollers.