Shop by category
Shop all componentsSensors & MCUs
Normal: UBRR = f cpu ÷ (16 × baud) − 1Double speed: UBRR = f cpu ÷ (8 × baud) − 1Error = (actual − wanted) ÷ wanted16 MHz and 115200 baud: normal speed gives UBRR = 8 → 111,111 baud (−3.55%, marginal). Double speed gives UBRR = 16 → 117,647 baud (+2.12%), which is what Arduino uses.
The serial port derives its bit rate by dividing the CPU clock by an integer. Most baud rates do not divide evenly, so the real rate differs slightly from the one you ask for, and if the error is too large two devices cannot talk reliably.
The transmitter and receiver together can tolerate roughly 3% total error. That is why 16 MHz clocks work well at 9600 baud but are marginal at high baud rates, and why crystals such as 18.432 MHz, which divide to exact baud rates, are popular in serial equipment.
Keep it under about 2 %. Above that, characters get corrupted.
16 MHz does not divide evenly to 115200, giving about 2.1 % error. Double-speed mode (U2X) reduces it to −0.8 %.
UART-friendly crystals such as 7.3728 MHz or 14.7456 MHz divide exactly to standard baud rates.
Normal: UBRR = f cpu ÷ (16 × baud) − 1; Double speed: UBRR = f cpu ÷ (8 × baud) − 1; Error = (actual − wanted) ÷ wanted.
16 MHz and 115200 baud: normal speed gives UBRR = 8 → 111,111 baud (−3.55%, marginal). Double speed gives UBRR = 16 → 117,647 baud (+2.12%), which is what Arduino uses.
Geekobot builds that use it include Power cut SMS alert, Inverter battery low SMS alert, Water tank full SMS alert and Farm pond low-level SMS alert. Each has the full parts list, wiring and code.
Results are estimates for design and learning. Check critical designs against the component datasheet. Made by the Geekobot Learning Team. How we write our calculators