Rainbow-electronics ATmega32L Manuel d'utilisateur Page 143

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 313
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 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⊕⊕⊕⊕⊕⊕
=
=
Vue de la page 142
1 2 ... 138 139 140 141 142 143 144 145 146 147 148 ... 312 313

Commentaires sur ces manuels

Pas de commentaire