
155
ATmega8515(L)
2512A–AVR–04/02
USART Baud Rate Registers –
UBRRL and UBRRH
The UBRRH Registershares the same I/Olocation as the UCSRC Register. See the
“Accessing UBRRH/UCSRC Registers”onpage 149section which describeshow to
access thisregister.
• Bit 15 – URSEL: Register Select
Thisbit selectsbetween accessing the UBRRH or the UCSRC Register. Itisread as
zero when reading UBRRH.The URSEL must be zero when writing the UBRRH.
• Bit 14:12 – Reserved Bits
These bits are reservedforfutureuse. Forcompatibilitywithfuture devices, these bit
must be written to zero when UBRRH iswritten.
• Bit 11:0 – UBRR11:0: USART Baud Rate Register
This is a12-bit registerwhich contains the USART baudrate. The UBRRHcontains the
four most significant bits, and the UBRRLcontains theeight least significant bits of the
USART baudrate. Ongoing transmissionsbytheTransmitter and Receiverwill be cor-
rupted if the baudrate ischanged. Writing UBRRLwill trigger an immediate update of
the baudrate prescaler.
Examples of Baud Rate
Setting
Forstandard crystal andresonatorfrequencies, themost commonly usedbaudratesfor
asynchronous operation can be generatedbyusing the UBRR settings in Table 68.
UBRR valueswhich yield an actualbaudrate differing less than 0.5%from thetarget
baudrate, are bold in thetable. Higher errorratings areacceptable,but the receiverwill
have less noise resistance when theerrorratings are high, especially forlarge serial
frames(see “AsynchronousOperational Range” on page 146).Theerror values are cal-
culated using the following equation:
Bit 15 14 13 12 11 10 9 8
URSEL – – – UBRR[11:8] UBRRH
UBRR[7:0] UBRRL
76543 210
Read/Write R/W RRRR/W R/W R/W R/W
R/W R/W R/W R/W R/W R/W R/W R/W
Initial Value00000000
00000000
Error[%]
BaudRate
Closest Match
BaudRate
--------- ----------------- ------------ ------------------ 1–
100%•=
Comentários a estes Manuais