Skip to content

Main content

Uart Oversampling Divider Error Tool

Calculate uart oversampling divider error from explicit caller-supplied inputs.

Loading tool…

Description

Calculate actualBaud = clock / (oversampling × divider), requiring positive clock and baud and positive integer divisors.

UART frames combine a start bit, data, optional parity, and stop duration. Baud rate and framing choices jointly determine time and overhead, while polarity and parity correctness are separate checks.

Calculate actualBaud = clock / (oversampling × divider), requiring positive clock and baud and positive integer divisors.

When to use this tool

Use Uart Oversampling Divider Error when you need one UART timing, framing, or field calculation.

How to use the tool and how it works

  1. Enter clock, baud, oversampling, divider. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read actualBaud, relativeError. Use the output convention below.

Calculate actualBaud = clock / (oversampling × divider), requiring positive clock and baud and positive integer divisors. Return actualBaud / baud - 1 as relativeError.1

Input fieldMeaning and unitsAccepted input
clockClockRequired. Finite number; strictly above 0.
baudBaudRequired. Finite number; strictly above 0.
oversamplingOversamplingRequired. Safe integer; minimum 1.
dividerDividerRequired. Safe integer; minimum 1.
Output fieldInterpretationReturned shape
actualBaudActual BaudRequired. Finite number.
relativeErrorSigned dimensionless error fraction; multiply by 100 only to display percent.Required. Finite number.
json
{
  "input": {
    "clock": 16000000,
    "baud": 100000,
    "oversampling": 16,
    "divider": 10
  },
  "output": {
    "actualBaud": 100000,
    "relativeError": 0
  }
}

Limitations and assumptions

  • The signed error is a fraction, not percent; supported divider encodings and receiver timing limits are not inferred.
  • Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
  • Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.

Alternative or Complementary methods

Confirm the device's supported frame format and clock budget, then inspect a measured serial waveform where needed.

References

  1. Calculation and input contract: microcontroller/uart-oversampling-divider-error — tool.io

Similar or alternative tools