MCU Tips: Quick Definitions of CAN, I2C, JTAG, SPI, SWD, and UART

Here are some quick definitions of CAN, I2C, JTAG, SMB, SPI, SWD, and UART which come up frequently when working with microcontrollers. We thought it might be useful to have their definitions on one page and include links to go deeper if desired.

CAN - Controller Area Network (CAN) bus is a robust 2-wire vehicle bus standard designed to allow microcontrollers and devices to communicate with each others' applications without a host computer. Message-based protocol. Lines are normally labeled CAN_H and CAN_L or similar.

I2C - a multi-parent bus invented by Philips in the 80s. Only uses 2 bi-directional lines: SDA (serial data line) and SCL (serial clock line). 7-bit address space.
https://interrupt.memfault.com/blog/i2c-in-a-nutshell

JTAG - Joint Test Action Group defined a boundary scan standard with a TAP (test access port), connector is minimum of 4 pins and is usually 10 or 14 pins.
The connector pins are:

  • TDI (Test Data In)
  • TDO (Test Data Out)
  • TCK (Test Clock)
  • TMS (Test Mode Select)
  • TRST (Test Reset) optional


SMB - SMBus, a single-ended 2-wire bus with one wire connected to ground. It's derived from I2C.

SPI - Serial Peripheral Interface, a 3- or 4-wire bus with separate clock and data lines as well as a select line for choosing the device to communicate with. When a 4-wire bus, the signal lines are often labeled: SCLK: Serial Clock (output from master), MOSI: Master Output Slave Input, or Master Out Slave In (data output from master), MISO: Master Input Slave Output, or Master In Slave Out (data output from slave), SS: Slave Select (often active low, output from master)

However, we recommend eliminating the casual reference to slavery by adopting these terms instead:

  • SDO – Serial Data Out. An output signal on a device where data is sent out to another SPI device.
  • SDI – Serial Data In. An input signal on a device where data is received from another SPI device.
  • CS – Chip Select. Activated by the controller to initiate communication with a given peripheral.
  • COPI (controller out / peripheral in). For devices that can be either a controller or a peripheral; the signal on which the device sends output when acting as the controller, and receives input when acting as the peripheral.
  • CIPO (controller in / peripheral out). For devices that can be either a controller or a peripheral; the signal on which the device receives input when acting as the controller, and sends output when acting as the peripheral.
  • SDIO – Serial Data In/Out. A bi-directional serial signal.

Thanks, OSHWA!...

https://www.oshwa.org/a-resolution-to-redefine-spi-signal-names

https://hackaday.com/2020/06/29/updating-the-language-of-spi-pin-labels-to-remove-casual-references-to-slavery/

SWD - Serial Wire Debug is a 2-wire (SWDIO/SWCLK) electrical alternative JTAG interface that has the same JTAG protocol on top

UART - Universal Asynchronous Receiver Transmitter device using 2 wires, doesn't require a clock line, data is organized into packets.
https://www.circuitbasics.com/basics-uart-communication/


Leave a comment

Please note, comments must be approved before they are published