0
0
Embedded Cprogramming~5 mins

Transmitting a byte over UART in Embedded C - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
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?
AIf the UART is powered off
BIf the receive buffer is full
CIf the transmit buffer is empty (TXE flag)
DIf the baud rate is set
What does UART stand for?
AUniversal Asynchronous Receiver/Transmitter
BUniversal Automatic Register Transfer
CUnified Asynchronous Register Timer
DUniversal Analog Receiver/Transmitter
In UART, what frames each byte of data?
AStart and stop bits
BParity bits only
CClock signal
DData checksum
What happens if you write to the UART data register before TXE is set?
AData is sent twice
BData may be lost or overwritten
CUART resets automatically
DNothing happens
Which of these is NOT part of UART transmission?
AStop bit
BStart bit
CData bits
DSynchronous 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.