Rainbow-electronics ATmega32L Bedienungsanleitung Seite 143

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 313
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 142
143
ATmega32(L)
2503C–AVR–10/02
The USART Character SiZe (UCSZ2:0) bits select the number of data bits in the frame.
The USART Parity mode (UPM1:0) bits enable and set the type of parity bit. The selec-
tion between one or two stop bits is done by the USART Stop Bit Select (USBS) bit. The
receiver ignores the second stop bit. An FE (Frame Error) will therefore only be detected
in the cases where the first stop bit is zero.
Parity Bit Calculation The parity bit is calculated by doing an exclusive-or of all the data bits. If odd parity is
used, the result of the exclusive or is inverted. The relation between the parity bit and
data bits is as follows::
P
even
Parity bit using even parity
P
odd
Parity bit using odd parity
d
n
Data bit n of the character
If used, the parity bit is located between the last data bit and first stop bit of a serial
frame.
P
even
d
n 1
d
3
d
2
d
1
d
0
0
P
odd
⊕⊕⊕⊕⊕⊕
d
n 1
d
3
d
2
d
1
d
0
1⊕⊕⊕⊕⊕⊕
=
=
Seitenansicht 142
1 2 ... 138 139 140 141 142 143 144 145 146 147 148 ... 312 313

Kommentare zu diesen Handbüchern

Keine Kommentare