# UART
- [Universal asynchronous receiver-transmitter | Wikipedia](https://en.wikipedia.org/wiki/Universal_asynchronous_receiver-transmitter)
- Pins, both maintains a [[fifo|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|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`
> [!warning] Drawbacks
>
> - Clock needs to be embedded on both sides
> - Point to point protocol. (Bus is introduced in [[spi|SPI]].)