EC-9.5 Serial Buses: UART, SPI, I2C and CAN
You can choose between the four common buses for a given part and distance, wire and configure each of them, and say what happens on the wire when a device does not answer.
Before:S5-2. Computer Architecture and MicroprocessorsEC-7. Signals and SystemsUnlocks:PE1-4. Embedded C ProgrammingEC-13. Laboratory Practice, in Sequence
Nearly every sensor, display and memory a small system talks to arrives on one of four buses, and the choice is usually made by the part rather than by you. Knowing what each one costs in pins, speed, distance and failure behaviour is what turns reading a datasheet into a design decision.
Work through these
Why buses rather than more pins
A parallel connection is fast and spends a pin per line, and pins are the scarcest thing on a small package. Sending bits one after another trades time for pins, and for most sensors there is time to spare.
NPTEL: Embedded Systems Design (IIT Kharagpur) · CourseUART, and agreeing on a rate with no shared clock
Two wires, no clock between them, and both ends configured for the same rate in advance. A start bit lets the receiver line itself up, and a rate mismatch of a few per cent turns the data into rubbish.
NPTEL: Introduction to Embedded System Design (NSUT and IIT Jammu) · CourseSPI, and the cost of a select line per device
A shared clock and two data lines make SPI fast and simple, but every device needs its own select line. That is fine for three devices and awkward for twelve.
NPTEL: Embedded System Design with ARM (IIT Kharagpur) · CourseI2C, addresses and the acknowledge
Two wires for any number of devices, each with an address, and every byte answered by the receiver pulling the line low. A missing acknowledge is how you find out a device is absent or wired wrongly.
NPTEL: Introduction to Embedded System Design (NSUT and IIT Jammu) · CourseCAN, and a bus that expects to be argued with
A differential pair over tens of metres, with several senders allowed to start at once and the lowest identifier winning without a collision. It was built for vehicles, where a lost message matters.
NPTEL: Embedded Systems Design (IIT Kharagpur) · CourseChoosing between them, and what each fails at
Distance, number of devices, speed and whether errors must be detected decide the choice. SPI has no error detection at all, I2C stalls if one device holds a line, and UART has no addressing.
NPTEL: Microcontrollers and Applications (IIT Kanpur) · Course
Sign in to keep your progress.
Free resources
We haven't checked most of these for screen reader use yet.
- FreeNPTEL / IIT Kharagpur · CourseNPTEL: Embedded Systems Design (IIT Kharagpur)
- FreeNPTEL / Netaji Subhas University of Technology and IIT Jammu · CourseNPTEL: Introduction to Embedded System Design (NSUT and IIT Jammu)
- FreeNPTEL / IIT Kharagpur · CourseNPTEL: Embedded System Design with ARM (IIT Kharagpur)
- FreeNPTEL / IIT Kanpur · CourseNPTEL: Microcontrollers and Applications (IIT Kanpur)
Links last checked 3 Sept 2026.
Stuck here?
Ask a mentor. A real person answers, and they can see exactly which topic you're on. Usually within a couple of working days.
Checking your session…
Topics shown in module order.