Lab
How close is close enough?
The two ends of a serial link never agree exactly. There is no shared clock — the receiver sees one falling edge and counts bit-times from it. So the question is not whether the rates differ, but by how much before it breaks.
Drag the slider. Watch where the failure appears: always at the right-hand end, never the left.
What this shows
The two ends of a serial link never agree exactly, and they do not need to. The receiver samples near the middle of each bit, so it has about half a bit-time of slack before a sample lands in the wrong bit.
Timing error accumulates across the frame. The receiver synchronises once, on the falling edge of the start bit, then counts on its own. So a 1% error is 0.5% off at the first bit and 9.5% off at the tenth.
For a standard 8N1 frame the last slot sits 9.5 bit-times from the sync edge, which gives a hard ceiling of 0.5 / 9.5 = 5.26% total error between the two ends. NXP application note AN10333 quotes approximately 5% for the same frame. A real receiver gives up a little sooner: the ATmega328P datasheet puts an Arduino Uno's at about ±4.5%.
Failure always appears at the far end of the frame first, and the far end is the stop bit. Because the receiver knows the stop bit must be high, a mismatch raises a frame error rather than silently corrupting a data bit. Push the error higher and the failure spreads leftward into the data bits, but it never begins there.
The widely quoted 2% is the ATmega328P datasheet's recommended error for each end (±1.5% in double-speed mode), not the breaking point. 5.26% is where it breaks on paper and about 4.5% on a real Uno; 2% per end is where you design, because both ends contribute error and parts drift with temperature.
Common questions
- What is the maximum baud rate error for UART?
- For a standard 8N1 frame the arithmetic gives 5.26% total between the two ends before the last bit is sampled outside its own bit time, and NXP AN10333 quotes approximately 5%. A real receiver fails a little sooner: the ATmega328P datasheet gives about ±4.5% total for an Arduino Uno, and recommends keeping each end within ±2% to leave margin for temperature drift.
- Why is 2% quoted as the baud rate tolerance?
- Because 2% is the ATmega328P datasheet's recommendation for each end, not the point of failure. The failure point is about ±4.5% total on that chip (5.26% for an idealised 8N1 receiver), and it assumes a clean edge, no noise and no drift. Keeping each end within 2% keeps a real link inside the cliff rather than balanced on its edge.
- Which bit fails first when baud rates do not match?
- The stop bit. Error accumulates from the start bit onward, so the slot furthest from the synchronising edge is sampled wrongly first — and in an 8N1 frame that is the stop bit. This is why a mismatch reports a frame error instead of a corrupted byte.