Skip to main content\(\newcommand{\N}{\mathbb N} \newcommand{\Z}{\mathbb Z} \newcommand{\Q}{\mathbb Q} \newcommand{\R}{\mathbb R}
\newcommand{\lt}{<}
\newcommand{\gt}{>}
\newcommand{\amp}{&}
\definecolor{fillinmathshade}{gray}{0.9}
\newcommand{\fillinmath}[1]{\mathchoice{\colorbox{fillinmathshade}{$\displaystyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\textstyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\scriptstyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\scriptscriptstyle\phantom{\,#1\,}$}}}
\)
Exercises 10.5 Practice Problems
1.
Is the USART capable of full-duplex, half-duplex, or simplex communication?
2.
Does the USART operate synchronously or asynchronously?
Answer.
it can operate either synchronously or asynchronously
3.
True or false: SPI requires an external clock to operate.
Answer.
false (the ATmega328P supplies its own clock signal in primary mode)
4.
The secondary select line on the SPI protocol is active-____.
5.
Using the SPI protocol, data is received and transmitted in chunks of how many bits?
6.
How many specific secondary devices can be supported with the TWI protocol?
7.
True or false: the TWI protocol requires an external clock to operate.
Answer.
false (the ATmega328P supplies its own clock signal in primary mode)
8.
Calculate the parity of the data byte
11011001.
Answer.
Solution.
There are 5 ones in
11011001. 5 is an odd number. Therefore
11011001 has odd parity.
9.
Calculate the parity of the data byte
01010011.
Answer.
Solution.
There are 4 ones in
01010011. 4 is an even number. Therefore
01010011 has even parity.
10.
Generate an odd parity bit for the data byte
11010011.
Answer.
Solution.
\begin{align*}
1 \oplus 1 \amp= 0\\
0 \oplus 0 \amp= 0\\
0 \oplus 1 \amp= 1\\
1 \oplus 0 \amp= 1\\
1 \oplus 0 \amp= 1\\
1 \oplus 1 \amp= 0\\
0 \oplus 1 \amp= 1
\end{align*}
11.
Generate an even parity bit for the data byte
11010011.
Answer.
Solution.
\begin{align*}
1 \equiv 1 \amp= 1\\
1 \equiv 0 \amp= 0\\
0 \equiv 1 \amp= 0\\
0 \equiv 0 \amp= 1\\
1 \equiv 0 \amp= 0\\
0 \equiv 1 \amp= 0\\
0 \equiv 1 \amp= 0
\end{align*}