Why Do Microcontrollers Use Oversampling in UART?

UART communication is asynchronous.
That means the transmitter and receiver do not share the same clock. Each device runs using its own oscillator, which can have small timing differences.
So how does the receiver know exactly when to read each bit?
The answer is oversampling.
Instead of sampling the signal once per bit, most microcontrollers sample it 16 times during one bit period.
This allows the UART hardware to:
• Detect the start bit precisely
• Sample near the center of each bit (where the signal is most stable)
• Use multiple samples to filter noise
• Tolerate small clock mismatches between devices
For example, at 9600 baud, a typical UART receiver internally samples at:
9600 × 16 = 153600 samples per second
These extra samples help the receiver reconstruct the correct timing of each bit, making communication reliable even when clocks are not perfectly aligned.
Without oversampling, UART communication would be much more sensitive to noise and timing errors.
Oversampling is one of those small hardware techniques that quietly ensures robust serial communication in almost every microcontroller.
#EmbeddedSystems #Microcontrollers #UART #Firmware #EmbeddedEngineering #DigitalCommunication
#embedded_systems_world
#whyseries
Follow on LinkedIn

Comments

Popular posts from this blog

Why Do Microcontrollers Start with an Internal Oscillator?

Why Can’t Large Constants Always Fit Inside CPU Instructions?

Why Does the Stack Usually Grow Downward?