Level 1 — Basic calculation
UART Baud-Rate Divisor & Error
Baud-rate divisor, actual baud rate and error of a UART for a clock and oversampling, with bit time and throughput.
How it works — UART Baud-Rate Divisor & Error
Inputs
- fclk
- Peripheral clock (MHz)
- OS
- Oversampling
Formula
- N = round(f_clk/(OS·baud))
- baud = f_clk/(OS·N)
- error = (actual − target)/target
Results
- N
- Divisor
- 1/baud
- Bit time
Inputs
Results
Enter your values and press Calculate. The defaults are a worked example.
Formula
N = round(f_clk/(OS·baud)) · baud = f_clk/(OS·N) · error = (actual − target)/target
Formulas are evaluated in SI units; inputs and results are converted.
Show the math
Worked solution
Press Calculate to see every step with your values substituted.
Calculation level & design standard
Level 1 — Basic calculation
A direct engineering equation.
Preliminary engineering calculation — no jurisdiction-specific code compliance claimed. Verify the applicable requirements with a qualified professional.
Assumptions
- Integer divisor (no fractional baud-rate generator).
References
- Microchip AVR / ST STM32 reference manuals — USART chapters
Results are for preliminary design and education. Verify against the governing code and have critical work checked by a licensed professional engineer.
More Electrical Engineering tools
- Electrical Engineering PWM Timer: Frequency, Duty Cycle & Resolution Timer TOP and compare values, actual frequency, resolution, duty step and average output of a microcontroller PWM, with the waveform. Open tool
- Electrical Engineering ADC / DAC Resolution, Sampling & Aliasing LSB size, output code, ideal SQNR, Nyquist frequency, aliasing and data rate of an analog-to-digital converter, with a sampling chart. Open tool
- Electrical Engineering PID Controller Step Response (Closed-Loop Simulation) Simulate a PID loop on a first-order-plus-dead-time or second-order plant: step response, overshoot, rise and settling time, steady-state error, actuator limits and SIMC tuning. Open tool
- Electrical Engineering Transfer Function Analysis: Poles, Bode, Nyquist, Root Locus Poles, zeros, stability, DC gain, gain and phase margins, Bode, Nyquist and root-locus plots and the step response of a transfer function, open or closed loop. Open tool