Examples of Baud
Rate Setting
Table 82. Examples of UBRR Settings for Commonly Used Oscillator Frequencies
f
= 1.0000 MHz
osc
Baud
U2X = 0
Rate
(bps)
UBRR
Error
2400
25
0.2%
4800
12
0.2%
9600
6
-7.0%
14.4k
3
8.5%
19.2k
2
8.5%
28.8k
1
8.5%
38.4k
1
-18.6%
57.6k
0
8.5%
76.8k
–
–
115.2k
–
–
230.4k
–
–
250k
–
–
(1)
Max
62.5 kbps
1.
UBRR = 0, Error = 0.0%
ATmega128
194
For standard crystal and resonator frequencies, the most commonly used baud rates for asyn-
chronous operation can be generated by using the UBRR settings in
which yield an actual baud rate differing less than 0.5% from the target baud rate, are bold in the
table. Higher error ratings are acceptable, but the receiver will have less noise resistance when
the error ratings are high, especially for large serial frames (see
Range" on page
186). The error values are calculated using the following equation:
U2X = 1
UBRR
Error
UBRR
51
0.2%
47
25
0.2%
23
12
0.2%
11
8
-3.5%
6
-7.0%
3
8.5%
2
8.5%
1
8.5%
1
-18.6%
0
8.5%
–
–
–
–
125 kbps
BaudRate
⎛
Closest Match
Error[%]
=
------------------------------------------------------- - 1
⎝
BaudRate
f
= 1.8432 MHz
osc
U2X = 0
U2X = 1
Error
UBRR
0.0%
95
0.0%
47
0.0%
23
7
0.0%
15
5
0.0%
11
3
0.0%
7
2
0.0%
5
1
0.0%
3
1
-25.0%
2
0
0.0%
1
–
–
0
–
–
–
115.2 kbps
230.4 kbps
Table
"Asynchronous Operational
⎞
•
–
100%
⎠
f
= 2.0000 MHz
osc
U2X = 0
Error
UBRR
Error
0.0%
51
0.2%
0.0%
25
0.2%
0.0%
12
0.2%
0.0%
8
-3.5%
0.0%
6
-7.0%
0.0%
3
8.5%
0.0%
2
8.5%
0.0%
1
8.5%
0.0%
1
-18.6%
0.0%
0
8.5%
0.0%
–
–
–
–
–
125 kbps
82. UBRR values
U2X = 1
UBRR
Error
103
0.2%
51
0.2%
25
0.2%
16
2.1%
12
0.2%
8
-3.5%
6
-7.0%
3
8.5%
2
8.5%
1
8.5%
–
–
0
0.0%
250 kbps
2467S–AVR–07/09
Need help?
Do you have a question about the ATmega128 and is the answer not in the manual?
Questions and answers