269
XMEGA B [DATASHEET]
8291B–AVR–01/2013
Figure 21-4. UCPHA and INVEN data transfer timing diagrams.
21.4
Frame Formats
Data transfer is frame based, where a serial frame consists of one character of data bits with synchronization bits (start
and stop bits) and an optional parity bit for error checking. Note that this does not apply to master SPI operation (See
“SPI Frame Formats” on page 270
). The USART accepts all combinations of the following as valid frame formats:
1 start bit
5, 6, 7, 8, or 9 data bits
no, even, or odd parity bit
1 or 2 stop bits
A frame starts with the start bit, followed by all the data bits (least-significant bit first and most-significant bit last). If
enabled, the parity bit is inserted after the data bits, before the first stop bit. One frame can be directly followed by a start
bit and a new frame, or the communication line can return to the idle (high) state.
possible combinations of frame formats. Bits inside brackets are optional.
Figure 21-5. Frame formats.
21.4.1 Parity Bit Calculation
Even or odd parity can be selected for error checking. If even parity is selected, the parity bit is set to one if the number of
logical one data bits is odd (making the total number of ones even). If odd parity is selected, the parity bit is set to one if
the number of logical one data bits is even (making the total number of ones odd).
XCK
Data setup (TXD)
Data sample (RXD)
XCK
Data setup (TXD)
Data sample (RXD)
XCK
Data setup (TXD)
Data sample (RXD)
XCK
Data setup (TXD)
Data sample (RXD)
UCPOL=0
UCPOL=1
UCPHA=0
UCPHA=1
St
Start bit, always low.
(n)
Data bits (0 to 8).
P
Parity bit, may be odd or even.
Sp
Stop bit, always high.
IDLE
No transfers on the communication line (RxD or TxD). The IDLE state is always high.
1
0
2
3
4
[5]
[6]
[7]
[8]
[P]
St
Sp1 [Sp2] (St / IDLE)
(IDLE)
FRAME
Содержание XMEGA B
Страница 320: ...320 XMEGA B DATASHEET 8291B AVR 01 2013 Table 25 12 7 segments Character Table...
Страница 321: ...321 XMEGA B DATASHEET 8291B AVR 01 2013 Table 25 13 14 segments Character Table...
Страница 322: ...322 XMEGA B DATASHEET 8291B AVR 01 2013 Table 25 14 16 segments Character Table...
Страница 412: ...412 XMEGA B DATASHEET 8291B AVR 01 2013...
Страница 413: ...413 XMEGA B DATASHEET 8291B AVR 01 2013...
Страница 414: ...414 XMEGA B DATASHEET 8291B AVR 01 2013...