Skip to content

Lab 7: UART And Serial Ports

Generated folder: labs/uart/

Lab 7 introduces serial communication through a 16550-style UART. A UART turns bytes into a stream and receives a stream back into bytes.

Device Model

Register ideaRole
line controlword length, stop bits, parity, divisor access
divisor latchbaud-rate divisor
FIFO controlreceive/transmit buffering
line statusdata-ready and transmitter-ready bits
interrupt enablewhich events raise IRQs
loopbacktransmit is routed back to receive

Plan

  1. Configure baud rate through the divisor latch.
  2. Restore normal line control.
  3. Enable FIFO mode.
  4. Send only when transmitter-ready is set.
  5. Read only when data-ready is set.
  6. Use loopback before testing paired programs.

Next: implementation tasks.

Course/docs licensed CC BY 4.0. Code licensed MIT.