Communication Protocols · Interview question

What's the difference between UART, RS-232, and RS-485?

A strong answer

UART is the protocol/peripheral layer, the asynchronous framing (start/data/parity/stop) at the MCU's logic voltage levels. RS-232 and RS-485 are physical-layer electrical standards that carry that framing over a cable. RS-232 is a point-to-point standard using bipolar voltages (nominally ±5 to ±15 V, with the polarity inverted relative to logic), good for short runs, and needs a level-shifting transceiver (like a MAX232) between the MCU's UART pins and the connector. RS-485 is a differential, multi-drop standard: it sends each bit as the voltage difference between two wires, which rejects common-mode noise and allows long cable runs (hundreds of meters) and many devices on one bus, but it's half-duplex on a two-wire bus, so you must control the transceiver's driver-enable to turn the line around between transmit and receive. So the same UART byte stream can ride over plain logic levels, RS-232, or RS-485 depending on the transceiver; the framing is identical, the electricals and topology differ. The practical danger is wiring an MCU's 3.3 V UART pins directly to an RS-232 port, the ±12 V will damage the MCU.

What a weak answer sounds like

You know the answer. Do you know what gets you dinged?

Pro breaks down the answer most candidates actually give to this question — and the specific reason an interviewer marks it down. It’s the difference between sounding correct and sounding senior, on all 472 questions.

From the lesson

UART

Two wires, no clock, and a pre-agreed baud: the UART frame (start/data/parity/stop), how the receiver recovers timing by oversampling, and an interrupt-driven RX ring buffer.

More UART questions

Browse all 472 interview questions
What's the difference between UART, RS-232, and RS-485? | EmbeddedPrep.io