Recall & Review
beginner
What is UART in embedded systems?
UART stands for Universal Asynchronous Receiver/Transmitter. It is a hardware communication protocol used to send and receive data one byte at a time asynchronously.
Click to reveal answer
beginner
Which register is commonly checked before sending a byte over UART?
The Transmit Data Register Empty (TXE) flag or equivalent is checked to ensure the UART is ready to send a new byte.
Click to reveal answer
intermediate
Why do we wait for the TXE flag before writing data to the UART data register?
Waiting for the TXE flag ensures the previous byte has been moved from the data register to the shift register, so the data register is free to accept a new byte without overwriting.
Click to reveal answer
beginner
Show a simple C code snippet to transmit a byte over UART assuming a register UART_DR and a flag UART_SR_TXE.
while (!(UART_SR & UART_SR_TXE)) { } // Wait until TXE is set
UART_DR = byte_to_send; // Write byte to data register
Click to reveal answer
beginner
What does asynchronous mean in UART communication?
Asynchronous means data is sent without a shared clock signal. Instead, start and stop bits frame each byte so the receiver knows when data begins and ends.
Click to reveal answer
What must you check before writing a byte to the UART data register?
✗ Incorrect
You check the TXE flag to ensure the transmit buffer is empty and ready to accept a new byte.
What does UART stand for?
✗ Incorrect
UART stands for Universal Asynchronous Receiver/Transmitter.
In UART, what frames each byte of data?
✗ Incorrect
Start and stop bits frame each byte to mark the beginning and end in asynchronous communication.
What happens if you write to the UART data register before TXE is set?
✗ Incorrect
Writing before TXE is set can overwrite data that has not yet been transmitted, causing data loss.
Which of these is NOT part of UART transmission?
✗ Incorrect
UART is asynchronous and does not use a synchronous clock signal.
Explain the steps to transmit a single byte over UART in embedded C.
Think about how to know when UART is ready and how to send the byte.
You got /4 concepts.
Describe why UART communication is called asynchronous and how it affects byte transmission.
Focus on timing and framing of data.
You got /4 concepts.