UART

  • Universal asynchronous receiver-transmitter | Wikipedia
  • Pins, both maintains a FIFO, interrupts can be raised with change in buffers
    • Tx, transmitting
    • Rx, receiving
    • Cross wiring, Tx <--> Rx
  • Frame components
    • Start: force transition, clock synchronized
    • Data
    • Parity: (optional) data with parity should have even number of 1 bits.
    • Stop: to distinguish from the start
  • Typical Baud Rate: hundreds of kb/s
  • Protocols
    • RS-232, 3 Volts to 15 Volts
    • RS-485, 36 Volts, medical/laboratory equipments
  • Flow Control
    • Driven by receiver, “I have space for you” or “I’m full, slow down”
    • Software: using XON (Ctrl-Q) and XOFF (Ctrl-S) as control bits.
    • Hardware
      • RTS (ready to send) and CTS (ok to receive) pins are added
      • DSR and DST (dataset read/terminated)
  • Handshaking: confirm whether the frame is received correctly, using ACK and NAK

Drawbacks

  • Clock needs to be embedded on both sides
  • Point to point protocol. (Bus is introduced in SPI.)