UART Control and Status Register B - UCSRB

Bit

7 6 5 4 3 2 1 0  

 

RXCIE TXCIE UDRIE RXEN TXEN CHR9 RXB8 TXB8

UCSRB

Read/Write R/W R/W R/W R/W R/W R/W R W  
Initial Value 0 0 0 0 0 0 1 0  

Bit 7 - RXCIE:  UART Receive Complete Interrupt Enable

When this bit is set (one), a setting of the RXC bit in UCSRA will cause the Receive Complete interrupt routine to be executed provided that global interrupts are enables.

Bit 6 - TXCIE:  UART Transmit Complete Interrupt Enable

When this bit is set (one), a setting of the TXC bit in UCSRA will cause the Transmission Complete interrupt routine to be executed provided that global interrupts are enabled.

Bit 5 - UDRIE:  UART Data Register Empty Interrupt Enable

When this bit is set (one), a setting of the UDRE bit in UCSRA will cause the UART Data Register Empty interrupt routine to be executed provided that global interrupts are enabled.

Bit 4 - RXEN:  Receiver Enable

This bit enables the UART receiver when set (one).  When the receiver is disabled, the RXC, OR, and FE status flags cannot become set.  If these flags are set, turning off RXEN does not cause them to be cleared.

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 are received characters are 9 bits long plus start and stop bits.  The 9th bit is read and written by using the RXB8 and TXB8 bits in UCSRB, respectively.  The 9th 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 9th data bit of the received character.

Bit 0 - TXB8:  Transmit Data Bit 8

When CHR9 is set (one), TXB8 is the 9th data bit in the character to be transmitted.

 

Note:  All information on this page was taken from pages 72 and 73 of the ATmega163 Data Sheet.