What is UART in microcontroller?
UART = Universal Asynchronous Receiver/Transmitter . It’s the hardware block inside a microcontroller that turns bytes in memory into a serial bitstream on a pin (TX) and turns a bitstream on another pin (RX) back into bytes— without a shared clock line . What it does (in plain terms) Sends : shifts out bits LSB-first with a start bit (low), data bits (usually 8), optional parity , then stop bit(s) (high). Receives : watches RX for a falling edge (start), samples the line (often 16× oversampling), reconstructs the byte, checks parity/stop, raises flags/interrupts. Idle= 1 ──┐ Start Data bits (LSB→MSB) Parity Stop └─ 0 ─────b0─b1─b2─b3─b4─b5─b6─b7─(P)────── 1 ── Typical pins & wiring TX (transmit), RX (receive), GND (ground). Cross them: TX ↔ RX and share ground. Optional RTS/CTS for hardware flow control. Some MCUs support single-wire half-duplex (TX/RX on one pin). Electrical levels (important!) TTL/CMOS UART : 0–3.3 V or 0–5 V...