Continue to Site

Welcome to

Welcome to our site! is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to choose the proper bus between SPI, I2C, UART?

Not open for further replies.


Newbie level 1
May 26, 2003
Reaction score
Trophy points
Activity points
difference between uart and spi

If there are three kind of interfaces that I can choose, how do I choose proper interface to use? What are purposes of SPI, I2C, and UART? Lastly, what's difference between "Bus" and " Interface"?

Beacuse I'm a freshman in "Bus" & " Interface", please provide me some basic and useful informantion. Thanks.
difference between uart and i2c

hi ,
Basic differences betn them....
SPI : mainly for high data rates ,approx 25MHz clock
but only bus has to be on same voltage level, single master(can be done thru S/W), data arbitration not possible
I2C: mainly for control and low data transfer..(limited by bus capacitance etc..)
but can be interfaced to diff voltage levels and multimaster bus enviornment,inbuilt arbitration etc...
UART: single P2P comm, 115kbps max, normally used with pc only...

May be u should look the FAq's of all the three and compare them.
Bus is and interconnection bet'n 2 systems as a whole,interface normally deals with just the phy connection bet'n two devices.

Hope this should be a good starter but i strongly recommend that u should check out the spec of the busses and come to a conclusion to the requirements for each in the embedded system.

what is the difference between uart and i2c


You also need to consider bus bandwith, bus length, number of devices, access and responce time, bus arbitration, maste-slave organization,bus protocols, electrical and physical constraints.

For IC conection on the same board you can use SPI or I2C bus. But for multi-board connection you must use PCI or some other bus(VME, Multibus, ...).

difference between spi and uart

All three are communication protocols.
Ususlly the targte device dictates which one you are going to deal with.

Interface is the way in which you connect the controller to the target device.
e.g. I2C requires pull- up resistors on both it lines.

Each protocols has its own characteristic features:
e.g I2C connection length cannot exceed 6".

I hope this helps.

spi i2c choice

The Serial Peripheral Interface Bus or SPI (often pronounced like "spy") bus is a very loose standard for controlling almost any digital electronics that accepts a clocked serial stream of bits. A nearly identical standard called "Microwire" is a restricted subset of SPI.

SPI is cheap, in that it does not take up much space on an integrated circuit, and effectively multiplies the pins, the expensive part of the IC. It can also be implemented in software with a few standard IO pins of a microcontroller.

Many real digital systems have peripherals that need to exist, but need not be fast. The advantage of a serial bus is that it minimizes the number of conductors, pins, and the size of the package of an integrated circuit. This reduces the cost of making, assembling and testing the electronics.

A serial peripheral bus is the most flexible choice when many different types of serial peripherals must be present, and there is a single controller. It operates in full duplex (sending and receiving at the same time), making it an excellent choice for some data transmission systems.

In operation, there is a clock, a "data in", a "data out", and a "chip select" for each integrated circuit that is to be controlled. Almost any serial digital device can be controlled with this combination of signals.

SPI signals are named as follows:

* SCLK - serial clock
* MISO - master input, slave output
* MOSI - master output, slave input
* CS - chip select (optional, usually inverted polarity)

Most often, data goes into an SPI peripheral when the clock goes low, and comes out when the clock goes high. Usually, a peripheral is selected when chip select is low. Most devices have outputs that become high impedance (switched-off) when the device is not selected. This arrangement permits several devices to talk to a single input. Clock speeds range from several thousand clocks per second (usually for software-based implementations), to over 10 million per second.

Most SPI implementations clock data out of the device as data is clocked in. Some devices use that trait to implement an efficient, high-speed full-duplex data stream for applications such as digital audio, digital signal processing, or full-duplex telecommunications channels.

On many devices, the "clocked-out" data is the data last used to program the device. Read-back is a helpful built-in-self-test, often used for high-reliability systems such as avionics or medical systems.

In practice, many devices have exceptions. Some read data as the clock goes up (leading edge), others read as it goes down (falling edge). Writing is almost always on clock movement that goes the opposite direction of reading. Some devices have two clocks, one to "capture" or "display" data, and another to clock it into the device. In practice, many of these "capture clocks" can be run from the chip select. Chip selects can be either selected high, or selected low. Many devices are designed to be daisy-chained into long chains of identical devices.

SPI looks at first like a non-standard. However, many programmers that develop embedded systems have a software module somewhere in their past that drives such a bus from a few general-purpose I/O pins, often with the ability to run different clock polarities, select polarities and clock edges for different devices.

The interface is also easy to implement for bench test equipment. For example, the classic way to implement an SPI interface from a personal computer to custom electronics is via a custom cable to the PC's parallel printer port. The parallel port generates and reads standard TTL logic voltages; +5V is high, ground is low. A number of helpful people have developed drivers to give access to this port in the most restrictive operating systems, such as Windows NT (see below), from the least likely environments, such as Visual Basic.

In some organizations, these pieces of code have become quite stylized and generalized. Often the serial bus passes through a programmable logic array, making the hardware programmable, as well as the software (see JTAG).

Motorola actually developed a standard microcontroller peripheral for these sorts of buses, which gave them a name.

A UART or Universal Asynchronous Receiver-Transmitter is a piece of computer hardware that translates between parallel bits of data and serial bits. A UART is usually an integrated circuit used for serial communications over a computer or peripheral device serial port. UARTs are now built into some microcontrollers (for example, PIC16F628).

I²C is a serial computer bus invented by Philips that is used to attach low-speed peripherals to a motherboard, embedded system, or cellphone. The name is an abbreviation for Inter-Integrated Circuit and is pronounced I-squared-C.
Not open for further replies.

Part and Inventory Search

Welcome to