atmega161-4pi ATMEL Corporation, atmega161-4pi Datasheet - Page 76

no-image

atmega161-4pi

Manufacturer Part Number
atmega161-4pi
Description
8-bit Microcontroller With 16k Bytes Of In-system Programmable Flash
Manufacturer
ATMEL Corporation
Datasheet
Baud Rate Generator
76
ATmega161(L)
• Bit 2
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 RXB8n and TXB8 bits in
UCSRnB, respectively. The ninth data bit can be used as an extra stop bit or a parity bit.
• Bit 1
When CHR9n is set (one), RXB8n is the ninth data bit of the received character.
• Bit 0
When CHR9n is set (one), TXB8n is the ninth data bit in the character to be transmitted.
The baud rate generator is a frequency divider that generates baud rates according to
the following equation:
For standard crystal frequencies, the most commonly used baud rates can be generated
by using the UBR settings in Table 24. 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 = Baud rate
f
UBR = Contents of the UBRRH and UBRR Registers (0 - 4095)
Note that this equation is not valid when the UART transmission speed is doubled.
See “Double-speed Transmission” for a detailed description.
CK
= Crystal clock frequency
CHR90/CHR91: 9-bit Characters
RXB80/RXB81: Receive Data Bit 8
TXB80/TXB81: Transmit Data Bit 8
BAUD
=
--------------------------------- -
16(UBR
f
CK
+
1 )
1228D–AVR–02/07

Related parts for atmega161-4pi