UART
- Universal asynchronous receiver-transmitter | Wikipedia
- Pins, both maintains a FIFO, interrupts can be raised with change in
buffers
Tx, transmittingRx, receiving- Cross wiring,
Tx <--> Rx
- Frame components
- Start: force transition, clock synchronized
- Data
- Parity: (optional) data with parity should have even number of
1bits. - 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) andXOFF(Ctrl-S) as control bits. - Hardware
RTS(ready to send) andCTS(ok to receive) pins are addedDSRandDST(dataset read/terminated)
- Handshaking: confirm whether the frame is received correctly, using
ACKandNAK
Drawbacks
- Clock needs to be embedded on both sides
- Point to point protocol. (Bus is introduced in SPI.)