UART, USART, SPI, TWI/I2C, USB -> protocols widely used in embedded systems for serial data communication.
Protocol
Developed by
Data tx mode
Clock signal
Operation type
Wires
Bit rates
Bus limits
Advantages
Disadvantages
Use cases
UART
Asynchronous
Not transmitted
Full-duplex
Minimum 2 pins (rx & tx)
frame size: Start + 5 bits + stop
simplest forms of data transmission from a controller/PC
Because of its speed limitation, UART is not used for high speed devices. For a correct communication, both sides must know (Baudrate, Stop bits, Parity and Databits)
RS232-1: Modems, PC-board connections. * Communications with peripherals.
USART
Synchronous
Transmitted
Full-duplex or half-duplex
SPI
Motorola
Synchronous
Transmitted
Full duplex
3(MOSI, MISO, SCLK) + X slaves + gnd
Higher bit rates than I2C
High bit rate serial communciation, simple protocol. Data size not restricted to 8 bit data.
Many wires, no flux control, no ACK mechanism-> error detection in higher levels. It can be established only for short distance communication unlike USART
Implementación de control de motores
TWI/I2C
NXP-Philips
Asynchronous
Not transmitted
Full-duplex & Hall-duplex(possible)
2 (SDA, SCL) + gnd
Standar: up to 100 kbps, Fast: up to 400 kbps, High-speed: up to 3.4 Mbps
Capacity smaller than 400pF, Up to 2-3 meters, Up to 20-30 devices.
Low to medium data rate communication, Master-Slave and Multi-master. Collision detection, Arbitration
More complicated than SPI
To attach slow speed peripherals to the embedded microprocessor (E2PROM, real time clock systems, remote temperature sensors)
USB
Intel
Not transmitted
4 pinout: +5VDC, DATA -, DATA +, Ground
Speed of data very high. Due to the ability to supply power to the preipheral devices USB is often used as a power charger for portable devices
Many microcontrollers don`t support USB communication, AVR has controllers with support
Serial Communication Types
UART, USART, SPI, TWI/I2C, USB -> protocols widely used in embedded systems for serial data communication.