Baud Rate Calculator
Calculate UART bit timing and baud rate error for any crystal.
| Baud | Bit time | Frame (8N1) |
|---|---|---|
| 110 | 9.091 ms | 90.909 ms |
| 300 | 3.333 ms | 33.333 ms |
| 600 | 1.667 ms | 16.667 ms |
| 1,200 | 833.333 µs | 8.333 ms |
| 2,400 | 416.667 µs | 4.167 ms |
| 4,800 | 208.333 µs | 2.083 ms |
| 9,600 | 104.167 µs | 1.042 ms |
| 14,400 | 69.444 µs | 694.444 µs |
| 19,200 | 52.083 µs | 520.833 µs |
| 38,400 | 26.042 µs | 260.417 µs |
| 57,600 | 17.361 µs | 173.611 µs |
| 115,200 | 8.681 µs | 86.806 µs |
| 230,400 | 4.340 µs | 43.403 µs |
| 460,800 | 2.170 µs | 21.701 µs |
| 921,600 | 1.085 µs | 10.851 µs |
ボーレート計算ツールの仕組み
ボーレート計算ツールは任意のシステムクロック周波数に対するUARTタイミングパラメーター(ビット周期・フレーム時間・プリスケーラーレジスタ値・ボーレート誤差率)を計算します。組み込み開発者がSTM32・ESP32・AVRその他のマイコンでUARTペリフェラルを設定したり、特定の水晶で実現可能な実際のボーレートが目標の±2%許容誤差内に収まるかを確認するために使用します。
最も一般的なUARTボーレートは9600・19200・38400・57600・115200・230400・460800・921600ボーです。9600ボーでは各ビットが104.17 µs幅です。115200ボーでは各ビットが8.68 µsです。UARTプロトコルは各ビットの中間点でサンプリングするため、受信側の発振器は10ビット分の累積タイミング誤差が1ビット周期の±50%を超えないほどの精度が必要です。
標準の8N1 UARTフレームは1スタートビット+8データビット+1ストップビット=合計10ビットです。115200ボーでは1バイトの送信に86.8 µsかかります。2ストップビット(8N2)を追加するとフレームごとに8.68 µs追加されます。9600ボーの8N1では最大スループットはわずか960バイト/秒——10ビットのうち2ビットがフレーミングのオーバーヘッドでペイロードデータではないためです。
STM32のUART BRR = f_clock / baud_rate(APB1上のUSART2には整数部と小数部があります)。16 MHzのAVRでUBRR = (f_osc / (16 × baud)) − 1の場合、115200ボーレートではUBRR = 7.68——8に丸めると実際のレートは111,111ボーで−3.5%の誤差が生じ、安全な閾値をわずかに超えます。計算ツールは正確な誤差を示すので、ダブルスピードモード(U2X=1)またはより適切なクロック周波数を選べます。
8 MHz・16 MHz・12 MHzの一般的な水晶は標準ボーレートに正確に割り切れません。UART精度のために特別に選ばれた非標準の11.0592 MHzを使うと、9600・19200・38400・57600・115200ボーで誤差0%を達成できます。計算ツールの誤差カラムにより、どのボーレートとクロック周波数の組み合わせが誤差ゼロで、どれが許容できないドリフトを招くかをすぐに特定できます。
よくある質問
- What is baud rate?
- Baud rate is the number of symbol changes per second in a communication channel. For binary UART, 1 baud = 1 bit per second, so 9600 baud means 9600 bits per second.
- What baud rate error is acceptable?
- For UART communication, a baud rate error under 2% is generally acceptable. Above 3–5%, framing errors and data corruption can occur, especially with long frames.
- Why do baud rates like 9600 and 115200 exist?
- Standard baud rates are derived from UART crystal frequencies (e.g., 1.8432 MHz) that divide evenly to produce common rates. Crystals like 11.0592 MHz were chosen specifically because they produce 0% error at standard baud rates.
関連ツール
- Resistor Color Code Calculator
Decode resistor color bands. Supports 4-band and 5-band.
- Ohm's Law Calculator
Calculate voltage, current, resistance, or power using Ohm's Law.
- Voltage Divider Calculator
Calculate output voltage for a resistor voltage divider.
- 555 Timer Calculator
Calculate frequency, duty cycle, and timing for 555 timer circuits.
- CRC Calculator
Calculate CRC checksums — CRC-8, CRC-16, CRC-32, and custom polynomials.