Two Interfaces of a Microcontroller (MCU)
Overview and Circuit Examples of Parallel and Serial Interfaces
There are two main methods by which a microcontroller exchanges data with other devices:
- Parallel Interface
- Serial Interface
A parallel interface transmits and receives data, for example, 8-bit data in a single clock cycle. Theoretically, this allows for high transfer speeds; however, it requires as many signal lines as the data bit length, which can hinder device miniaturization. In contrast, a serial interface uses fewer signal lines to transmits and receives data. For example, with 8-bit data, it uses a single signal line and sends or receives one bit at a time in sequence, requiring a total of eight cycles.
Parallel Interface (Bus Interface) Circuit Example
Serial Interface Circuit Example
In the past, parallel interfaces were considered fast, while serial interfaces were regarded as slow. However, with advancements in device technology and the adoption of differential signaling *1 to improve noise immunity, high-speed serial interfaces operating in the MHz and GHz ranges have become common. When attempting to increase the speed of a parallel interface, synchronizing multiple signal lines becomes challenging. As a result, today, serial interfaces generally achieve higher transmission speeds compared to parallel interfaces.
*1 Differential Signaling
A method that uses two signal lines, one positive and one negative, and treats their difference as data. This approach makes communication less susceptible to external noise and enables high-speed, high-quality transmission. It is commonly adopted in high-speed serial communication.
However, when implementing a high-speed serial interface, it is essential to take measures to prevent signal line interference, and increases in power consumption and cost should be expected. On the other hand, for a serial interface that do not require high-speed transfer, interference management is minimal, and increases in power consumption and cost can be avoided. Therefore, such interfaces are still widely integrated into many microcontrollers and continue to be used in numerous applications. In this document, we will focus on general-purpose serial interfaces commonly built into microcontrollers, without the use of differential signaling.
Types and Characteristics of Serial Interfaces in Microcontrollers (MCUs)
This article provides an overview of the three types of serial interfaces commonly found in general-purpose microcontrollers: UART, SPI, and I²C.
| Type | Overview and Features | Detailed Explanation |
|---|---|---|
| UART (Universal Asynchronous Receiver/Transmitter) is an asynchronous serial communication interface that transmits and receives data through separate transmit (TX) and receive (RX) lines without using a clock signal. Because its wiring and control mechanisms are relatively simple and cost-effective, UART is widely used for communication between microcontrollers, sensor interfacing, communication with PCs, and debug log output. | View Details of UART | |
| SPI | SPI (Serial Peripheral Interface) is a synchronous serial communication interface that transmits and receives data in synchronization with a clock signal. It is well suited for high-speed communication, and although it requires somewhat more wiring than some other interfaces, its control scheme is simple. SPI is widely used to connect microcontroller peripherals such as sensors, memory devices, and display modules. | View Details of SPI |
| I2C (Inter-Integrated Circuit) is a synchronous serial communication interface that enables multiple devices to be connected using only two lines: a clock line and a data line. Because it minimizes wiring requirements and allows peripheral devices to be identified through address-based communication, I2C is widely used for connecting low- to medium-speed devices such as sensors, EEPROMs, and real-time clocks (RTCs). | View Details of I2C |
