3 Examples of Baud Rate Setting

The following table contains equations for calculating the baud rate (in bits per second) and for calculating the UBRR value for each mode of operation using an internally generated clock source.

Table 3-1. Equations for Calculating Baud Rate Register Setting
Operating ModeEquation for Calculating Baud Rate(1)Equation for Calculating UBRR Value
Asynchronous Normal mode (U2X = 0)
BAUD=fOSC16UBRR+1
UBRR=fOSC16BAUD1
Asynchronous Double Speed mode (U2X = 1)
BAUD=fOSC8UBRR+1
UBRR=fOSC8BAUD1
Synchronous Master mode
BAUD=fOSC2UBRR+1
UBRR=fOSC2BAUD1
Note: 1. The baud rate is defined to be the transfer rate in bit per second (bps).
BAUD
Baud rate (in bits per second, bps).
fOSC
System oscillator clock frequency.
UBRR
Contents of the UBRRH and UBRRL Registers, (0-4095).

For standard crystal and resonator frequencies, the most commonly used baud rates for asynchronous operation can be generated by using the UBRR settings as listed in the following table. For details on clock options supported by a device, refer the device datasheet.

UBRR values 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. The error values are calculated using the following equation:

Error[%]=(BaudRateClosest MatchBaudRate1)×100%
Table 3-2. Examples of UBRR Settings for Commonly Used Oscillator Frequencies
Baud Rate [bps]fosc = 1.0000MHzfosc = 1.8432MHzfosc = 2.0000MHz
U2X = 0U2X = 1U2X= 0U2X = 1U2X = 0U2X = 1
UBRRErrorUBRRErrorUBRRErrorUBRRErrorUBRRErrorUBRRError
2400250.2%510.2%470.0%950.0%510.2%1030.2%
4800120.2%250.2%230.0%470.0%250.2%510.2%
96006-7.0%120.2%110.0%230.0%120.2%250.2%
14.4k38.5%8-3.5%70.0%150.0%8-3.5%162.1%
19.2k28.5%6-7.0%50.0%110.0%6-7.0%120.2%
28.8k18.5%38.5%30.0%70.0%38.5%8-3.5%
38.4k1-18.6%28.5%20.0%50.0%28.5%6-7.0%
57.6k08.5%18.5%10.0%30.0%18.5%38.5%
76.8k1-18.6%1-25.0%20.0%1-18.6%28.5%
115.2k08.5%00.0%10.0%08.5%18.5%
230.4k00.0%
250k00.0%
Max(1)62.5kbps125kbps115.2kbps230.4kbps125kbps250kbps
Note: 1. UBRR = 0, Error = 0.0%
Table 3-3. Examples of UBRR Settings for Commonly Used Oscillator Frequencies (Continued)
Baud Rate [bps]fosc = 3.6864MHzfosc = 4.0000MHzfosc = 7.3728MHz
U2X = 0U2X = 1U2X = 0U2X = 1U2X = 0U2X = 1
UBRRErrorUBRRErrorUBRRErrorUBRRErrorUBRRErrorUBRRError
2400950.0%1910.0%1030.2%2070.2%1910.0%3830.0%
4800470.0%950.0%510.2%1030.2%950.0%1910.0%
9600230.0%470.0%250.2%510.2%470.0%950.0%
14.4k150.0%310.0%162.1%34-0.8%310.0%630.0%
19.2k110.0%230.0%120.2%250.2%230.0%470.0%
28.8k70.0%150.0%8-3.5%162.1%150.0%310.0%
38.4k50.0%110.0%6-7.0%120.2%110.0%230.0%
57.6k30.0%70.0%38.5%8-3.5%70.0%150.0%
76.8k20.0%50.0%28.5%6-7.0%50.0%110.0%
115.2k10.0%30.0%18.5%38.5%30.0%70.0%
230.4k00.0%10.0%08.5%18.5%10.0%30.0%
250k0-7.8%1-7.8%00.0%10.0%1-7.8%3-7.8%
0.5M0-7.8%00.0%0-7.8%1-7.8%
1M0-7.8%
Max.(1)230.4kbps460.8kbps250kbps0.5Mbps460.8kbps921.6kbps
Note: 1. UBRR = 0, Error = 0.0%
Table 3-4. Examples of UBRR Settings for Commonly Used Oscillator Frequencies (Continued)
Baud Rate [bps]fosc = 8.0000MHzfosc = 11.0592MHzfosc = 14.7456MHz
U2X = 0U2X = 1U2X = 0U2X = 1U2X = 0U2X = 1
UBRRErrorUBRRErrorUBRRErrorUBRRErrorUBRRErrorUBRRError
24002070.2%416-0.1%2870.0%5750.0%3830.0%7670.0%
48001030.2%2070.2%1430.0%2870.0%1910.0%3830.0%
9600510.2%1030.2%710.0%1430.0%950.0%1910.0%
14.4k34-0.8%680.6%470.0%950.0%630.0%1270.0%
19.2k250.2%510.2%350.0%710.0%470.0%950.0%
28.8k162.1%34-0.8%230.0%470.0%310.0%630.0%
38.4k120.2%250.2%170.0%350.0%230.0%470.0%
57.6k8-3.5%162.1%110.0%230.0%150.0%310.0%
76.8k6-7.0%120.2%80.0%170.0%110.0%230.0%
115.2k38.5%8-3.5%50.0%110.0%70.0%150.0%
230.4k18.5%38.5%20.0%50.0%30.0%70.0%
250k10.0%30.0%2-7.8%5-7.8%3-7.8%65.3%
0.5M00.0%10.0%2-7.8%1-7.8%3-7.8%
1M00.0%0-7.8%1-7.8%
Max.(1)0.5Mbps1Mbps691.2kbps1.3824Mbps921.6kbps1.8432Mbps
Note: 1. UBRR = 0, Error = 0.0%
Table 3-5. Examples of UBRR Settings for Commonly Used Oscillator Frequencies (Continued)
Baud Rate [bps]fosc = 16.0000MHzfosc = 18.4320MHzfosc = 20.0000MHz
U2X = 0U2X = 1U2X = 0U2X = 1U2X = 0U2X = 1
UBRRErrorUBRRErrorUBRRErrorUBRRErrorUBRRErrorUBRRError
2400416-0.1%8320.0%4790.0%9590.0%5200.0%10410.0%
48002070.2%416-0.1%2390.0%4790.0%2590.2%5200.0%
96001030.2%2070.2%1190.0%2390.0%1290.2%2590.2%
14.4k680.6%138-0.1%790.0%1590.0%86-0.2%173-0.2%
19.2k510.2%1030.2%590.0%1190.0%640.2%1290.2%
28.8k34-0.8%680.6%390.0%790.0%420.9%86-0.2%
38.4k250.2%510.2%290.0%590.0%32-1.4%640.2%
57.6k162.1%34-0.8%190.0%390.0%21-1.4%420.9%
76.8k120.2%250.2%140.0%290.0%151.7%32-1.4%
115.2k8-3.5%162.1%90.0%190.0%10-1.4%21-1.4%
230.4k38.5%8-3.5%40.0%90.0%48.5%10-1.4%
250k30.0%70.0%4-7.8%82.4%40.0%90.0%
0.5M10.0%30.0%4-7.8%40.0%
1M00.0%10.0%
Max.(1)1Mbps2Mbps1.152Mbps2.304Mbps1.25Mbps2.5Mbps
Note: 1. UBRR = 0, Error = 0.0%