$$ \newcommand{\R}{\mathbb{R}}
\newcommand{\N}{\mathbb{N}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\C}{\mathbb{C}}
\newcommand{\dx}{\text{ dx}}
\newcommand{\rang}{\text{rang}}
\newcommand{\s}{\ \ \ \ \ \ }
\newcommand{\arrows}{\s \Leftrightarrow \s}
\newcommand{\Arrows}{\s \Longleftrightarrow \s}
\newcommand{\arrow}{\s \Rightarrow \s}
\newcommand{\c}{\bcancel}
\newcommand{\v}[2]{
\begin{pmatrix}
#1 \\
#2 \\
\end{pmatrix}
}
\newcommand{\vt}[3]{
\begin{pmatrix}
#1 \\
#2 \\
#3 \\
\end{pmatrix}
}
\newcommand{\stack}[2]{
\substack{
#1 \\
#2
}
}
\newcommand{\atom}[3]{
\substack{
#1 \\
#2
}
\ce{#3}
}
$$
UART Protocol
See Lesson 9.pdf>page=23
Data is sent with the LSB first.
Common Baud Rates
Frequency (Hz) |
4800 |
9600 |
19200 |
115200 |
1000000 |
To set the baud rate for AVR use this formula to set the UBRRL register.
$$\text{UBRRL} = \frac{F_{osc}}{16 \cdot baudrate} -1 $$
Parity
If enabled: adds one extra bit at the end of the message. If the number of ones in the message is even the parity bit is zero, and vise versa.