UART · Module 1
What a UART Actually Is
Two digital systems need to exchange a small amount of data over very few wires, and no clock travels with it. A UART is the logic that answers that problem — it converts between locally meaningful parallel data and timed activity on a single line, and the timing agreement it depends on is what the rest of the curriculum builds.
Two digital systems sit on the same board. One has a byte the other needs. They have separate crystals, separate reset domains, and — because pins are expensive and the connector is already full — perhaps two signal wires between them. Nobody is going to route a clock alongside the data.
That is the engineering situation a UART exists for, and it is worth sitting with before any acronym is expanded. The systems can agree on things in advance, at design time, in a configuration register. What they cannot do is tell each other, in the moment, when a bit begins. A UART is the logic that makes an exchange work anyway — and every later chapter in this curriculum is a consequence of how it does that.
This chapter builds the abstraction. Not the frame, not the sampling, not the RTL: the boundary. Once you can say precisely what a UART converts between, and what information the conversion has to reconstruct at the far end, the rest of the track stops being a list of features and becomes a sequence of consequences.
1. The Problem, Stated Precisely
Take the board-level situation above and write down what is actually available.
Wires are scarce. A byte held inside a device occupies eight bits simultaneously — that is what makes it locally cheap to work with. Carrying it between devices in that form costs eight signal wires plus whatever qualifies them, and the cost is paid in package pins, connector contacts, board routing area and the discipline of keeping those signals matched. For a link that carries a console log or a few registers' worth of configuration, that cost is absurd.
Sending the bits one at a time is the obvious answer, and it creates a new problem. A single wire can carry all eight bits if it carries them in sequence. But a wire has exactly two things a receiver can observe: its level, and when that level changed. It does not carry any indication of how many bits have gone past, or where one ends and the next begins. Those boundaries were implicit in the parallel form — eight wires, eight bits, no ambiguity — and serialising throws that information away.
One way to put it back is to send a clock too. If the transmitter drives a clock alongside the data, every edge on that clock tells the receiver exactly when to look. That works, and a great many interfaces do precisely this. It costs at least one more wire, and it requires the two ends to share a timing relationship tight enough for that clock to be usable at the receiver.
A UART takes the other option: send no clock at all. The receiver is given one signal and nothing else, and must work out the bit boundaries itself.
2. What Is Lost When the Clock Does Not Travel
Be specific about what the receiver no longer has, because every mechanism later in this curriculum exists to replace one of these.
It does not know when a transmission starts. The line has been sitting at some resting level. At some arbitrary moment relative to the receiver's own clock, it changes. Nothing announced it in advance.
It does not know how long a bit lasts — measured in its own clock. The two devices agreed on a rate at design time, but the receiver's clock and the transmitter's clock are generated by different oscillators. Neither is exact, and neither knows the other's error.
It does not know which bit it is looking at. Without boundaries, a level held on a wire is just a level. Two consecutive identical bits and one long bit produce the same observation unless the receiver is counting time deliberately.
And it does not know when the transmission ends. Something has to mark the end, or the receiver cannot tell a finished character from a line that has gone quiet mid-transfer.
The answer to all four is a prior agreement plus a per-transmission reference point. The two ends agree in advance on the rate and on the shape of a transmission. Then each transmission carries, in its own signalling, a point the receiver can lock onto — after which counting time against the agreed rate tells the receiver where every remaining bit boundary is. Reconstructing bit boundaries this way is timing recovery, and Module 2 is about how well it works and where it breaks.
That combination — an agreed shape, and per-transmission alignment — is what framing means here. It is the reason the transmitted unit is a frame and not just a byte.
3. The Abstraction: What a UART Converts Between
Now the definition, which is worth stating as a conversion rather than as an expansion of the acronym.
A UART is a block of logic that converts between parallel data that is meaningful inside one device, and timed activity on a single line that a matching block at the other end can convert back. The acronym — universal asynchronous receiver/transmitter — names the two halves and the defining property: asynchronous, meaning no clock accompanies the data.
That conversion is what the boundary is. On the inside, a UART is an ordinary synchronous element of a digital design: it is clocked by the system clock, it presents a byte and some control and status, and the logic around it never deals in bit times. On the outside, it drives and observes a wire on a timebase derived from an agreed rate, and nothing about that timebase is visible to the system it serves.
Read the figure as two separate statements rather than one loop.
Horizontally, it is a conversion and its inverse. A byte enters on the left in parallel form, exists in the middle as activity on a wire over some interval, and leaves on the right in parallel form again. The byte is not transported — it is re-created, from timing evidence, by logic that never saw the original.
Vertically, it is two independent channels that happen to be packaged together. The upper path and the lower path share nothing but a housing. A device's transmitter and its receiver each own their own direction, which is why a UART is described as full duplex — Chapter 1.3 takes that apart properly.
4. Which Side Creates Timing, and Which Side Must Recover It
This asymmetry is the single most useful thing to carry out of this chapter, because it decides the shape of every implementation you will meet.
The transmitter creates the timing. It is the only party that knows when a transmission is starting, because it is the one starting it. It derives a bit-duration timebase from its own system clock and the configured rate, and then produces line activity on that timebase. Nothing about its job is uncertain: it counts, it drives, it counts again. Sequencing a transmission is a control problem, and a well-specified one.
The receiver must recover the timing. It is handed a signal that changes at moments unrelated to its own clock, and must decide — for each bit — when to look, based on a rate it was told about at configuration time and an alignment point it finds in the signal itself. The quality of that decision is the quality of the link.
5. What the Two Ends Must Agree On in Advance
Since nothing is negotiated in the moment, everything structural must be settled beforehand. Two UARTs interoperate only when their configurations match, and a mismatch does not announce itself — it produces plausible-looking wrong data, which is a considerably worse failure than silence.
At this level of the curriculum you need the categories, not the fields:
- The rate — how long one bit lasts. Both ends compute a timebase from their own system clocks toward the same nominal figure, and neither hits it exactly. Module 4 is about how close is close enough, and why that question has no single universal answer.
- The shape of a frame — how many bits of payload, whether anything additional accompanies them, and what marks the end. Module 3 owns the options and what each one buys.
- The interpretation of the payload bits — which transmitted bit is which bit of the byte. An agreement that both ends follow and neither transmits.
What is not agreed in advance is alignment. That is re-established from the signal on every frame, which is why a receiver that starts listening while the line is idle is correct from the first frame it sees. A receiver that starts listening partway through a frame has no such guarantee: it may mistake activity inside that frame for the start of one, and how quickly it recovers depends on the traffic and on how the receiver is built. Module 5 is where that recovery is designed rather than assumed.
6. What a UART Is Not
Several things sit near a UART in a real system and are routinely spoken of as though they were the same thing. Separating them now prevents a class of confusion later.
A UART is not an electrical standard. The UART is logic: it decides what activity to produce and how to interpret what it observes. What voltages that activity occupies, how far the link reaches, and how many devices can share it are properties of the electrical layer between the two UARTs — plain logic-level signalling on a board, or a transceiver implementing a standard such as RS-232 or RS-485. The same UART logic can sit behind different electrical layers, and those layers have genuinely different reach and connectivity characteristics. RS-232 is not a synonym for UART, and neither is RS-485. Chapter 1.4 treats the split properly; what matters here is not to merge them.
A UART is not a cable or a connector. A nine-pin shell on the back of an instrument is a physical arrangement that a UART-based link has historically been carried over. It is not the mechanism.
A UART is not the terminal program. Software that opens a port and prints characters is a consumer of the link. It is where a great deal of UART folklore comes from, and none of it is evidence about the hardware.
A UART is not a buffer. Production UART IP very often includes queues so that software or a DMA engine is not obliged to service every character individually, and those queues matter a great deal to throughput and to data loss. They are a property of the IP around the conversion, not of the conversion. Module 10 builds them.
A UART is not its register map. The control and status registers a processor sees are how one particular integration exposes the block. The same logic can be instantiated in a design with no processor anywhere, driven by a state machine. Module 13 covers the peripheral view.
The common thread: the UART is the conversion between parallel data and timed line activity. Everything else in the list is something attached to it.
7. Why This Matters in RTL, Verification and FPGA Work
The abstraction is not background reading — it decides what the work looks like in each of the three roles this track is written for.
For RTL design, the boundary in Figure 1 is a partition. One side of the block runs on the system clock and speaks in bytes and handshakes; the other runs on a derived bit timebase and speaks in line activity. That derived timebase is almost never a separate clock in a sane design — it is an enable in the same clock domain, and Module 8 explains why. The transmitter becomes sequencing logic; the receiver becomes decision logic; and the configuration you agreed on in §5 becomes parameters and registers that both halves consume.
For verification, the important consequence is that correctness here is temporal, not merely value-based. A transmitter that emits the right bits in the right order can still be wrong, because bit durations are part of the specification. A receiver can produce a correct byte for the wrong reason and fail on the next one. So a UART testbench cannot be built from value comparison alone — it needs a model of time, stimulus that can deliberately be imperfect, and checks on the shape of what appears on the wire. The configuration agreement of §5 is verification state: the matrix of legal combinations is part of what must be covered, not a detail. Modules 14 and 15 build that.
For FPGA work, two facts from this chapter dominate bring-up. The system clock has no relationship to the rate you need, so the timebase has to be constructed and its error accounted for — see Module 4. And the received signal arrives from outside the design entirely: it is a genuinely asynchronous input to your synchronous logic, and it must be treated as one before any decision is made about it. That is an ordinary, well-understood digital-design obligation with a standard answer, and it is a separate concern from the asynchronous serial timing this chapter has been describing — the two share a word and nothing else. Module 12 keeps them apart deliberately.
8. Reason It Through
Work this out before reading the answer.
An FPGA is receiving characters from a device across two board-level signals. Everything is configured identically at both ends and the link works. A colleague proposes removing the UART entirely and simply sampling the incoming wire every system-clock cycle, recording the levels, and reconstructing the bytes in software afterwards. They argue this is strictly more general, since nothing is thrown away.
Is the claim that nothing is thrown away correct? In a narrow sense, yes — a record of the line's level every clock cycle contains everything observable about the signal. The information is genuinely all there.
So what has actually changed? The work has moved, not disappeared. Something must still locate where transmissions begin, decide the boundaries between bits given a rate that only approximately matches, and reduce the record to bytes. That is precisely what the receiver was doing; the proposal relocates it into software and into memory, rather than removing it.
What does the relocation cost? Volume and timeliness. The wire is sampled continuously whether or not anything is being transmitted, so the design now produces a stream proportional to elapsed time rather than to characters received — and every byte's worth of payload arrives as a large number of samples that must be stored and then processed. The receiver, by contrast, produces one byte per frame and nothing at all while the line is idle. The proposal has replaced a small piece of dedicated logic with a large and continuous data-handling problem.
Is there any situation where the proposal is right? Yes, and naming it is the point of the exercise. When you are debugging — when the question is what is on the wire rather than what the bytes are — capturing the raw signal is exactly the right move, and an on-chip logic analyser does this deliberately. The proposal is a poor communication mechanism and an excellent diagnostic one. Knowing which of those you need is a large part of Module 17.
9. Understanding Check
10. Summary
Two digital systems need to exchange a modest amount of data over very few wires, and no clock travels with it. Serialising the data solves the wire problem and creates a timing one: on a single line, the bit boundaries that were implicit in the parallel form have to be reconstructed from when things happen rather than from which wire they happened on.
A UART is the logic that performs that conversion and its inverse. Inside a device it is an ordinary synchronous block dealing in parallel bytes on the system clock. On the line it produces and observes timed activity on a timebase derived from a rate both ends agreed on in advance. The transmitter and the receiver are independent, one per direction, which is what makes the link full duplex.
The asymmetry between the two halves is the thing to carry forward. The transmitter creates timing; the receiver has to recover it — and the receiver's difficulty is where nearly all of UART engineering lives. What the two ends settle in advance is the rate, the shape of a frame and how the payload bits are interpreted; what is re-established on every frame is alignment. A mismatch in the advance agreement does not stop the link — it corrupts it, sometimes detectably and sometimes not.
Finally, the UART is only that conversion. The electrical layer that carries the signal, the buffers around the block, the registers a processor sees and the software at the far end are all separate concerns attached to it — and keeping them separate is what makes the rest of this curriculum coherent rather than a collection of conventions.
11. What Comes Next
The problem is now stated; the next chapters take it apart in order. Chapter 1.2 examines what actually changes when the clock stops travelling with the data, comparing the two clocking models directly. Chapter 1.3 opens the TX/RX channel model and the line's resting state. Chapter 1.4 separates UART framing from the electrical layer properly — the distinction §6 only marked. Then Module 2 builds the timing model the whole track rests on: drift, per-frame recovery, and where the margin actually comes from.
Browse the full path on the UART tutorials index. If you want to see what a UART looks like from the other end of the engineering process before you build one: Case Study — A UART Agent verifies one in UVM, UART (FSM + shift register + baud timer) implements one as an RTL pattern, and UART APB Interface attaches one to a bus as an SoC peripheral. For the same "the requirements conflicted, so the interface changed shape" reasoning applied to a much larger problem, see The Memory Hierarchy.
Continue learning
Related tutorials
- Related topic
Synchronous vs Asynchronous Serial Links
A forwarded clock is a sampling reference generated by the same source as the data. Remove it and the receiver must assemble one from a configured rate, an observable event in the signal, and its own local clock — the responsibility shift that turns a receiver into a state machine and shapes every UART design decision that follows.
- Related topic
The UART Link: TX, RX, Idle and Full Duplex
A UART link is two independent one-way conductors, not one bidirectional bus — which removes arbitration, turnaround and direction control from the design, makes the naming endpoint-relative, and means full duplex guarantees simultaneity and nothing else.
- Related topic
Why Two Independent Clocks Can Still Communicate
Two free-running oscillators, never measured against each other, with no feedback path — and reliable communication anyway. The bargain has four terms, and the load-bearing one is that a frame ends, which discards the receiver's prediction before accumulated error becomes dangerous.
- Related topic
Start-Bit Synchronisation and Per-Frame Timing Recovery
The receiver knows the rate but not the phase. One guaranteed transition per frame supplies the missing half, and the reconstruction is discarded and rebuilt at the next frame rather than held across the stream — which is why nothing about the two clocks is ever synchronised.
Where this fits
Part of the UART curriculum.
