Datasheet
188
ATtiny828 [DATASHEET]
8371A–AVR–08/12
z Bit 0 – UCPOL: Clock Polarity
This bit is used for synchronous mode only. Write this bit to zero when asynchronous mode is used. The UCPOL bit sets
the relationship between data output change and data input sample, and the synchronous clock (XCK).
Table 71. Clock Polarity Settings
17.11.5 UCSRD – USART Control and Status Register D
z Bit 7 – RXSIE: USART RX Start Interrupt Enable
Writing this bit to one enables the interrupt on the RXS flag. In sleep modes this bit enables start frame detector that can
wake up the MCU when a start condition is detected on the RxD line. The USART RX Start Interrupt is generated only, if
the RXSIE bit, the Global Interrupt Enable flag, and RXS are set.
z Bit 6 – RXS: USART RX Start
The RXS flag is set when a start condition is detected on the RxD line. If the RXSIE bit and the Global Interrupt Enable
flag are set, an RX Start Interrupt will be generated when this flag is set. The flag can only be cleared by writing a logical
one to the RXS bit location.
If the start frame detector is enabled (RXSIE = 1) and the Global Interrupt Enable Flag is set, the RX Start Interrupt will
wake up the MCU from all sleep modes.
z Bit 5 – SFDE: Start Frame Detection Enable
Writing this bit to one enables the USART Start Frame Detection mode. The start frame detector is able to wake up the
MCU from sleep mode when a start condition, i.e. a high (IDLE) to low (START) transition, is detected on the RxD line.
Table 72. USART Start Frame Detection modes
UCPOL
Transmitted Data Changed
(Output of TxD Pin)
Received Data Sampled
(Input on RxD Pin)
0 Rising XCK Edge Falling XCK Edge
1 Falling XCK Edge Rising XCK Edge
Bit 76543210
(0xC3) RXSIERXSSFDE–––––UCSRD
Read/Write R/W R/W R R R R R R
Initial Value00100000
SFDE RXSIE RXCIE Description
0 X X Start frame detector disabled
1 0 0 Reserved
1 0 1
Start frame detector enabled. RXC flag wakes up
MCU from all sleep modes
1 1 0
Start frame detector enabled. RXS flag wakes up
MCU from all sleep modes
1 1 1
Start frame detector enabled. Both RXC and
RXS wake up the MCU from all sleep modes