Electronic – Difference between MISO/MOSI and TxD/ RxD

spiuart

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 ?

Best Answer

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.