13
\$\begingroup\$

What is the difference between USART and SPI ? There are [TXD/RXD] for USART and [MISO/MOSI/SCK/SS] for SPI. I know that SPI is a synchronous protocol but USART is hardware. But, what's difference between Synchronous part of USART and the hardware ?

\$\endgroup\$
1
  • 1
    \$\begingroup\$ A USART operating in synchronous mode is not necessarily completely incompatible with SPI, however it's asynchronous mode is quite different, in that the timing must be recovered from the data as no separate clock is sent. \$\endgroup\$ Jan 24, 2013 at 2:59

3 Answers 3

11
\$\begingroup\$

USART is a device (or peripheral). SPI is a standard method of connecting things.

USART stands for Universal Synchronous/Asynchronous Receiver/Transmitter, and is the basic thing you need if you want to transmit using RS-232.422/485/etc. The Synchronous part of a USART is not used very often, and is sometimes that functionality is left out of the device-- and then it's called a UART (pronounced You-Art).

USARTs (with an appropriate RS-232/etc driver/receiver) are mainly used to talk with devices over a cable. Sometimes they are used to talk between devices on the same PCB, or within the same box, but it is much more common to talk with another device over a cable.

SPI, the Serial Peripheral Interface Bus, is a completely different thing than a USART. SPI is mainly used to talk with devices on the same PCB or in the same box. For example, an MCU talking with a digital temperature sensor. It is almost never used to talk over a cable, from box to box.

The nice thing about SPI is that it is super simple, and the devices using SPI do not have to be MCUs. USARTs almost always require that MCUs of some sort are on both ends of the communication link. But USARTs can be connected using less wires over longer distances.

\$\endgroup\$
9
\$\begingroup\$

There is a major difference between USART and SPI; Synchronization

UART is Asynchronous - That means that the communication doesn't accompany a clock signal. Only data signals are connected along with sometimes optional flow control signals (RTS, CTS, DTR, DSR, etc.). UART can be full duplex or half duplex. RxD carries data from DCE to DTE. TxD carries data from DTE to DCE. UART is also point-to-point connection, there is one transmitter and one receiver on the whole link.
UART Connection

SPI is Synchronous - That means that the clock signal accompanies the data signal. MOSI - Master Out Slave In; MISO - Master In Slave Out; SCK - Clock signal from master to slave; SS - Slave Select signal selects slave devices. SPI is a bus and can have multiple devices on the bus. Because of a clock signal present, SPI can be operated faster than UART.
SPI Connection

\$\endgroup\$
2
\$\begingroup\$

The Synchronous (U*S*ART) is hardly ever used. When it is, its actually quite similar to SPI. In fact, many microcontrollers call (one of) the synchronous mode(s), the SPI mode. Some examples are here and here.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.