Baud rate generator – Rainbow Electronics AT90LS4433 User Manual
Page 59
59
AT90S/LS4433
1042G–AVR–09/02
• Bit 3 – TXEN: Transmitter Enable
This bit enables the UART Transmitter when set (one). When disabling the Transmitter
while transmitting a character, the Transmitter is not disabled before the character in the
Shift Register plus any following character in UDR has been completely transmitted.
• Bit 2 – CHR9: 9-bit Characters
When this bit is set (one), transmitted and received characters are nine bits long, plus
start and stop bits. The ninth bit is read and written by using the RXB8 and TXB8 bits in
UCSRB, respectively. The ninth data bit can be used as an extra stop bit or a parity bit.
• Bit 1 – RXB8: Receive Data Bit 8
When CHR9 is set (one), RXB8 is the ninth data bit of the received character.
• Bit 0 – TXB8: Transmit Data Bit 8
When CHR9 is set (one), TXB8 is the ninth data bit in the character to be transmitted.
Baud Rate Generator
The Baud Rate Generator is a frequency divider, which generates baud rates according
to the following equation:
•
BAUD = Baud Rate
•
f
CK
= Crystal Clock frequency
•
UBR = Contents of the UBRRHI and UBRR Registers, (0 - 4095)
For standard crystal frequencies, the most commonly used baud rates can be generated
by using the UBR settings in Table 19. UBR values that yield an actual baud rate differ-
ing less than 2% from the target baud rate are boldface in the table. However, using
baud rates that have more than 1% error is not recommended. High error ratings give
less noise resistance.
BAUD
f
CK
16(UBR
1
)
+
----------------------------------
=