\documentclass[11pt,dvips]{article}
\usepackage{epsfig}
\usepackage{fancyheadings}
\setlength{\parskip}{2ex}
%\setlength{\parindent}{0em}
\hoffset=-55pt
\voffset=-60pt
\textheight=9in
\textwidth=6.5in
\parindent=0pt
\parskip=10pt
\pagestyle{fancy}
\lhead{\bfseries EE 308 }
\chead{\bfseries }
\rhead{\bfseries Spring 1998}
\lfoot{\bfseries }
\cfoot{\thepage}
\rfoot{\bfseries }
\setlength{\headrulewidth}{0.5pt}
\begin{document}

\begin{Large}

\begin{center}
{\bf Using the HC12 PWM}
\end{center}

\begin{enumerate}
\item Choose 8-bit mode ({\tt PWCLK 7:6} = 00)
\item Choose left-aligned ({\tt PWCTL 3} = 0)
\item Choose polarity = 1 ({\tt PPOL 3:0} = 1111)
\item Select clock mode in {\tt PWPOL}: {\tt PCLKx} = 0 for $2^N$,\\
{\tt PCLKx} = 1 for
$2^{(N+1)} \times (M+1)$, 

\item Select $N$ in {\tt PWCLK} register:  {\tt PCKA 2:0} for channels 1, 0;
{\tt PCKB 2:0} for channels 3, 2.

\item If {\tt PCLKx} = 1, select $M$:    {\tt PWSCAL0 7:0} = $M$ for
channels 1, 0; {\tt PWSCAL1 7:0} = $M$ for channels 3, 2.

\item Select {\tt PWPERx}, normally between 200 and 255.

\item Enable desired PWM channels: {\tt PWEN 3:0}.

\item Select {\tt PWDTYx}, normally between 0 and {\tt PWPERx}.  Then
$${\rm Duty\ Cycle\ x} = \frac{{\tt PWDTYx}+1}{{\tt PWPERx}+1} \times 100 \%$$
Change duty cycle to control speed of motor or intensity of light, etc.

\item For 0\% duty cycle, choose {\tt PWDTYx} = 0xFF.


\end{enumerate}

\end{Large}
\end{document}
