ece312/lab_2/Empty LaTex ReportV1.tex

118 lines
2.4 KiB
TeX

\documentclass[12pt]{article}
\usepackage{comment}
\usepackage{float}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{pdfpages}
\usepackage[hidelinks]{hyperref}
\usepackage{listings}
\newcommand{\docTitle}{Musical Greeting Card}
\newcommand{\courseNum}{ECE 312}
\newcommand{\labName}{Lab 2}
\newcommand{\labSection}{D21}
\hypersetup{
pdftitle={\docTitle{}},
pdfauthor={David Lenfesty \& Willard Farmer},
bookmarksnumbered=true,
bookmarksopen=true,
bookmarksopenlevel=1,
colorlinks=false,
pdfstartview=Fit,
pdfpagemode=UseOutlines, % this is the option you were lookin for
pdfpagelayout=TwoPageRight
}
\title{ {\Huge \docTitle{}} \\
\courseNum{} - \labName{} - \labSection{} - Tuesday}
\author{
David Lenfesty\\
\texttt{lenfesty@ualberta.ca}\\
\texttt{ID: 1531446}
\and
Willard Farmer\\
\texttt{wfarmer@ualberta.ca}\\
\texttt{ID: XXXXXXX}
}
\begin{document}
\pagenumbering{roman}
\maketitle
\newpage
\tableofcontents
\newpage
\pagenumbering{arabic}
\section{Brief Description}
\section{Target Specifications}
\section{Schematic}
\section{Firmware Plan}
\begin{lstlisting}
main():
initialize_gpio()
initialize_timer()
loop forever:
if playing:
play_beat()
if not playing and button_is_pressed:
delay(debounce_time)
set flag playing
enable_interrupts()
if interrupt_button_press:
reset flag playing
play_rest()
// Will play rest of current beat then shut off
button_press_interrupt():
disable_interrupts()
set flag interrupt_button_press
// Plays one full beat
play_beat():
if current_note_has_duration:
keep playing note
else:
read next note
play_note(next_note)
current_note_duration--
delay(on_time)
if current_note_has_duration:
keep playing note
else
play_rest()
delay_rest_time
\end{lstlisting}
\section{Parts Required}
\begin{table}[H]
\centering
\begin{tabular}{c | c | c}
\textbf{Partno. / Description} & \textbf{Number Required} & \textbf{Return} \\
Attiny2313A & 1 & $\square$ \\
Piezoelectric Buzzer & 2 & $\square$ \\
Momentary Pushbutton & 1 & $\square$ \\
\end{tabular}
\end{table}
\end{document}