<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE document PUBLIC "-//CNX//DTD CNXML 0.5//EN" "http://cnx.rice.edu/cnxml/0.5/DTD/cnxml_plain.dtd">
<document xmlns="http://cnx.rice.edu/cnxml" xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="Module.2003-12-09.4938">
  <name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">eZdsp F2812 Tutorial</name>
  <metadata xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">
  <md:version xmlns:bib="http://bibtexml.sf.net/">1.3</md:version>
  <md:created xmlns:bib="http://bibtexml.sf.net/">2003/12/09 13:49:38 US/Central</md:created>
  <md:revised xmlns:bib="http://bibtexml.sf.net/">2003/12/10 22:58:14.243 US/Central</md:revised>
  <md:authorlist xmlns:bib="http://bibtexml.sf.net/">
    <md:author xmlns:bib="http://bibtexml.sf.net/" id="deaniafe">
      <md:firstname xmlns:bib="http://bibtexml.sf.net/">Deania</md:firstname>
      <md:othername xmlns:bib="http://bibtexml.sf.net/">M.</md:othername>
      <md:surname xmlns:bib="http://bibtexml.sf.net/">Fernandez</md:surname>
      <md:email xmlns:bib="http://bibtexml.sf.net/">deaniafe@rice.edu</md:email>
    </md:author>
  </md:authorlist>

  <md:maintainerlist xmlns:bib="http://bibtexml.sf.net/">
    <md:maintainer xmlns:bib="http://bibtexml.sf.net/" id="jpfrantz">
      <md:firstname xmlns:bib="http://bibtexml.sf.net/">Patrick</md:firstname>
      
      <md:surname xmlns:bib="http://bibtexml.sf.net/">Frantz</md:surname>
      <md:email xmlns:bib="http://bibtexml.sf.net/">jpfrantz@rice.edu</md:email>
    </md:maintainer>
    <md:maintainer xmlns:bib="http://bibtexml.sf.net/" id="deaniafe">
      <md:firstname xmlns:bib="http://bibtexml.sf.net/">Deania</md:firstname>
      <md:othername xmlns:bib="http://bibtexml.sf.net/">M.</md:othername>
      <md:surname xmlns:bib="http://bibtexml.sf.net/">Fernandez</md:surname>
      <md:email xmlns:bib="http://bibtexml.sf.net/">deaniafe@rice.edu</md:email>
    </md:maintainer>
  </md:maintainerlist>
  
  <md:keywordlist xmlns:bib="http://bibtexml.sf.net/">
    <md:keyword xmlns:bib="http://bibtexml.sf.net/">eZdsp</md:keyword>
    <md:keyword xmlns:bib="http://bibtexml.sf.net/">Texas Instruments</md:keyword>
    <md:keyword xmlns:bib="http://bibtexml.sf.net/">tutorial</md:keyword>
  </md:keywordlist>

  <md:abstract xmlns:bib="http://bibtexml.sf.net/">This module will demonstrate how to use Spectrum Digital's eZdsp F2812 to implement a finite impulse response (FIR) filter on an audio input.</md:abstract>
</metadata>

  <content xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">
<section xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="Objective">
<name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Objective</name>
<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="Obj1">
The purpose of this lab is to learn how to prepare Spectrum Digital’s eZdsp™ F2812 to implement a finite impulse response (FIR) filter using an audio input.  Since the F2812 does not have a digital-to-analog converter (DAC) as one of its peripherals, this lab will cover setting up the eZdsp™ to use two options:
<list xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="Options" type="enumerated">
<item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">TI's Multi-Converter EVM using the TLV5638 DAC</item>
<item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">An audio processing daughtercard</item>
</list>
</para>
</section>

<section xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="fil">
<name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">FIR Filtering</name>
<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="Sidenote">
Before you begin, review the <cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" document="m11682">basics of digital filtering</cnxn>.
</para>
</section>

<section xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="Introduction">
<name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Introduction to the eZdsp™ F2812</name>
<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="Intro1">
The eZdsp™ F2812 allows people to determine if the TI TMS320F2812 digital signal processor (DSP) is suitable for their application requirements.  It also allows evaluators to develop and run software for the F2812 processor by using Code Composer Studio.  A separate tutorial for the Code Composer Studio software will be available in this course.
</para>

<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="Intro2">
The eZdsp™ F2812 has the following features:
<list xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="Features" type="bulleted">
<item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">TMS320F2812 DSP</item>
<item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">150 MIPS operating speed</item>
<item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">18K words on-chip RAM</item>
<item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">128K words on-chip Flash memory</item>
<item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">64K words off-chip SRAM memory</item>
<item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">30 MHz clock</item>
<item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">2 Expansion Connectors (analog, I/O)</item>
<item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Onboard IEEE 1149.1 JTAG Controller</item>
<item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">5-volt only operation with supplied AC adapter</item>
<item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Onboard IEEE 1149.1 JTAG emulation connector</item>
</list>
</para>

<figure xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="fig1">
<name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">eZdsp™ F2812 Block Diagram from Spectrum Digital's Datasheet</name>
<media xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" type="image/jpg" src="eZdspF2812BlockDiagram.jpg"/>
</figure>
</section>

<section xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="Hardware">
<name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Hardware</name>
<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="hardware1">
To begin this lab, there are several tasks you will have to accomplish in order to set up your hardware before programming the DSP.  Some background information has been provided, but if you like additional information, please refer to the References section at the end of this lab.
</para>

<section xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="GettingStarted">
<name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Getting Started</name>
<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="getting1">
The eZdsp™ requires a 5V power supply that is provided and should be connected to the board via connector P6.  The supplied parallel cable also needs to be plugged into a PC that has Code Composer Studio installed on it. 
</para>

<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="getting2">
<emphasis xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Soldering Connectors</emphasis>
Since we will be working with the analog-to-digital converter (ADC) and the serial peripheral interface (SPI) on the eZdsp™S kit, we will want to solder two connectors on the board.  One header should be soldered onto pins 20-26 on the outline labeled P8 which deals specifically with SPI signals.  The second header should be soldered onto pins 2,4,6,8,10,12, and 14 on the outline labeled P9 which is where the analog signals are located.  
</para>


<figure xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" orient="horizontal" id="horfig1">
<subfigure xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="subfig1">
<media xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" type="image/jpg" src="SPIHeader.jpg"/>
<caption xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">P8 Header on the eZdsp Board</caption>
</subfigure>
<subfigure xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="subfig2">
<media xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" type="image/jpg" src="AnalogHeader.jpg"/>
<caption xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">P9 Header on the EVM</caption>
</subfigure>
</figure>


<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="getting4">
You will also need to solder a wire from pin 13 (GND) to pin 18 (VREFLO) on header P9 for proper ADC operation.
</para>

<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="getting5">
Your eZdsp™ setup should look like this:
<figure xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="fig2">
<media xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" type="image/jpg" src="eZdsp_setup.jpg"/>
<caption xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">eZdsp Setup</caption>
</figure>
</para>
</section>

<section xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="EVM">
<name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Multi-Converter Evaluation Module (EVM)</name>
<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="EVM1">
TI’s multi-converter evaluation module (EVM) is a kit that allows users to evaluate the performance of several devices in the multipurpose (MP) family of data converters.  It is designed to work with the TMS320 DSPs.  It comes with six different ADCs and ten various DACs.  For the purpose of our lab, we will be using the TLV5638 dual 12-bit DAC.
</para>

<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="EVM2">
<emphasis xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Setting up the EVM</emphasis>                                                                                            
The EVM has a header labeled J11 that needs to be connected to header P8 on the eZdsp™ board.  Using wires to do so, connect the following:
</para>

<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="EVM0">
<table xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" frame="all" id="pintable1">
<tgroup xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" cols="4" align="left" colsep="1" rowsep="1">
<thead xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" valign="top">
<row xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Pin No.</entry>
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Header P8</entry>
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Pin No.</entry>
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Header J11</entry>
</row>
</thead>
<tbody xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" valign="top">
<row xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">19</entry>
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">GND</entry>
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">1</entry>
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">GND</entry>
</row>
<row xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">20</entry>
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">GND</entry>
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">3</entry>
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">GND</entry>
</row>
<row xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">23</entry>
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">SPISIMOA</entry>
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">2</entry>
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">SDI</entry>
</row>
<row xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">25</entry>
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">SPICLKA</entry>
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">4</entry>
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">SCLK</entry>
</row>
<row xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">26</entry> 
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">SPISTEA</entry>
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">6</entry>
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">CS</entry>
</row>
</tbody>
</tgroup>
</table>
It should look something like this:
</para>


<figure xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="fig3">
<media xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" type="image/jpg" src="EVMHeader.jpg"/>
<caption xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">J11 Header with Wires on the EVM</caption>
</figure>

<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="EVM5">
After this, the boards are now set to communicate with each other:
</para>


<figure xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="fig4">
<media xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" type="image/jpg" src="EVM_eZdspSetup.jpg"/>
<caption xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">eZdsp F2812 and EVM Setup</caption>
</figure>


<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="EVM7">
Once the boards are connected, powering up the EVM board is the next step.  The EVM operates on four voltages: -12V, 0V, 12V, and 5V.  Solder one wire to each pin in connector J7.  After partially stripping each wire, use a power supply source to deliver the proper voltage to each pin.  The D1 LED should light green when done correctly as shown in the following picture:
</para>


<figure xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="fig5">
<media xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" type="image/jpg" src="EVMPower.jpg"/>
<caption xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">EVM Power LED</caption>
</figure>


<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="EVM9">
Since we will be using a DSP to generate signals, we will want to make sure the EVM board is configured as such.  Look for the SW1 switch on the right side of the board and make sure the following is set:
</para>

<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="EVM10">
<table xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" frame="all" id="switch1">
<tgroup xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" cols="2" align="left" colsep="1" rowsep="1">
<tbody xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" valign="top">
<row xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">SW1-1</entry>
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Off</entry>
</row>
<row xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">SW1-2</entry>
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">On</entry>
</row>
<row xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">SW1-3</entry>
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Off</entry>
</row>
<row xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">SW1-4</entry>
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Off</entry>
</row>
</tbody>
</tgroup>
</table>
</para>

<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="EVM11">
Once this is done, a second LED, which will light up orange, signifies that the EVM is set to operate via a DSP – “User Mode”.
</para>


<figure xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="fig6">
<media xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" type="image/jpg" src="UserModeLED.jpg"/>
<caption xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">User Mode LED</caption>
</figure>


<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="EVM13">
The board is now ready to receive signals.
</para>
</section>

<section xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="Audio">
<name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Audio Processing Board</name>
<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="audio1">
Another option for using an external DAC is the audio processing daughtercard that was designed after the eZdsp™ was successfully set up to communicate to the TLV5638 DAC on the EVM.  In this section, we will show how to set up the eZdsp™ to communicate with the daughtercard.
</para>


<figure xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" orient="horizontal" id="horfig2">
<name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Audio Processing Daughtercard</name>
<subfigure xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="subfig3">
<media xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" type="image/jpg" src="AudioFront.jpg"/>
<caption xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Front of the Board</caption>
</subfigure>
<subfigure xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="subfig4">
<media xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" type="image/jpg" src="AudioBack.jpg"/>
<caption xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Back of the Board</caption>
</subfigure>
</figure>


<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="audio3">
A simplified block diagram of the system is shown in the following figure:
</para>


<figure xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="fig7">
<media xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" type="image/jpg" src="AudioDaughtercardBlockDiagram.jpg"/>
<caption xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Audio Processing Board Block Diagram</caption>
</figure>


<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="audio5">
<emphasis xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Soldering</emphasis>
The only preparation the eZdsp™ requires to interface with the audio processing daughtercard is to solder two headers to P8 and P9 to the eZdsp™:
</para>

<figure xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="fig8">
<media xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" type="image/jpg" src="eZdspHeadersforAudio.jpg"/>
<caption xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Headers on the eZdsp for the Audio Daughtercard</caption>
</figure>

<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="audio7">
Once you are done with that, then all you have to do is join the two boards together through the headers:
</para>


<figure xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" orient="horizontal" id="horfig3">
<subfigure xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="subfig5">
<media xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" type="image/jpg" src="Audio_eZdspHeaders.jpg"/>
<caption xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Side View of the Mounted Boards</caption>
</subfigure>
<subfigure xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="subfig6">
<media xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" type="image/jpg" src="AudioMountedoneZdsp.jpg"/>
<caption xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Audio Daughtercard Mounted on the eZdsp</caption>
</subfigure>
</figure>


<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="audio9">
When you have the audio processing board mounted on the eZdsp™ F2812, then you will have to connect the power supply and parallel cable to the eZdsp™.  The LED labeled ‘Power’ on the daughtercard should light up bright orange if done correctly.
</para>

<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="audio10">
You will also have to connect the provided speaker to the jumper labeled ‘R_SPKR’ on the daughtercard.  Make sure the black wire is connected to the ‘-‘ and the red wire is connected to the ‘+’.  
</para>

<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="audio11">
For our lab, you will be using an Apple iPod to supply the audio source and that will have to be connected with the supplied cable to the jumper labeled J4 on the daughtercard.  Since the iPod we are using does not have a very reliable battery, be sure to have the iPod connected to a power supply.
Your setup should look like this:
</para>


<figure xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="fig9">
<media xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" type="image/jpg" src="TotalAudioSetup.jpg"/>
<caption xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Total Hardware Setup</caption>
</figure>


<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="audio13">
To turn the iPod on, just press the Play button.  To turn it off, hold the Play button until the screen goes blank, just like in previous picture.
</para>

<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="audio14">
<emphasis xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Controls</emphasis>
The daughtercard features two potentiometers that will be programmed later in this lab to control the volume of the output signal and the spectrum of filters that will be applied to the input signal. 
</para>
</section>
</section>

<section xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="software">
<name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Software</name>
<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="software1">
In this part of the lab, we will be using Code Composer Studio to set up the software implementation of the FIR filter on an audio signal.  If you are not familiar with Code Composer Studio, you might want to read over the ELEC 424 tutorial before you begin.  
</para>

<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="software2">
There are several peripherals and interfaces we will work with and a little background information will be given for each, but if you would like more information, please look under the References section at the end of this lab manual.
</para>

<section xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="SPI">
<name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Serial Peripheral Interface (SPI)</name>
<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="spi1">
The serial peripheral interface (SPI) is a high-speed synchronous serial input/output (I/O) port that allows a serial bit stream of programmed length (1-16 bits) to be shifted into and out of the device at a programmed bit-transfer rate.  The SPI is normally used for communications between the DSP controller and external peripherals, the DAC in our case, or another controller.
</para>

<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="spi2">
Since we will be implementing an FIR filter on an audio source, we will need to be able to communicate to the TI TLV5638 dual 12-bit DAC on the EVM.  We will do this by setting up the SPI on the F2812 DSP.  There are several registers that require the following values in order to operate properly:
<table xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" frame="all" id="spitable1">
<tgroup xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" cols="2" align="left" colsep="1" rowsep="1">
<thead xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" valign="top">
<row xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" align="center">Register Name</entry>
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" align="center">Register Value (HEX)</entry>
</row>
</thead>
<tbody xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" valign="top">
<row xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">SPICCR.bit.SPISWRESET</entry>
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">0</entry>
</row>
<row xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">SPICCR.all</entry>
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">0x005F</entry>
</row>
<row xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">SPICTL.all</entry>
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">0x001F</entry>
</row>
<row xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">SPISTS.all</entry>
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">0x0000</entry>
</row>
<row xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">SPIBRR.all</entry>
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">0x0002</entry>
</row>
<row xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">SPIFFTX.all</entry>
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">0xC028</entry>
</row>
<row xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">SPIFFRX.all</entry>
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">0x0028</entry>
</row>
<row xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">SPIFFCT.all</entry>
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">0x00</entry>
</row>
<row xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">SPIPRI.all</entry>
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">0x0010</entry>
</row>
<row xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">SPICCR.bit.SPISWRESET</entry>
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">1</entry>
</row>
<row xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">SPIFFTX.bit.TXFIFO</entry>
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">1</entry>
</row>
<row xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">SPIFFRX.bit.RXFIFORESET</entry>
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">1</entry>
</row>
</tbody>
</tgroup>
</table>
</para>

<note xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">The FIFOs are enabled and the SPI is interrupt driven.  You also control the bit transfer rate in the SPI baud rate register (SPIBRR).
</note>
</section>

<section xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="ADC">
<name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Analog-to-Digital Converter (ADC)</name>
<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="adc1">
The F2812 DSP has a 12-bit ADC core with built-in dual sample-and-hold (S/H).  It provides options for:
<list xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="adclist" type="bulleted">
<item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Simultaneous sampling or sequential sampling mode</item>
<item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Operating as two independent 8-state sequencers or as a one large 16-state sequencer</item>
<item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">16-channel, multiplexed inputs</item>
<item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Multiple source triggers for the start-of-conversion (SOC) sequence</item>
</list>
</para>

<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="adc2">
A block diagram of the ADC module:
</para>


<figure xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="fig10">
<media xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" type="image/jpg" src="F2812ADCBlockDiagram.jpg"/>
<caption xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Texas Instruments' ADC Block Diagram</caption>
</figure>

<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="adc4">
For this lab, we will be using sequential sampling, 16-bit cascaded mode and enable the event manager A (EVA) to be the source trigger for the SOC sequence.  We will set up the following registers to do so:
<table xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" frame="all" id="adctable1">
<tgroup xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" cols="2" align="left" colsep="1" rowsep="1">
<thead xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" valign="top">
<row xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" align="center">Register Name</entry>
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" align="center">Register Value (HEX)</entry>
</row>
</thead>
<tbody xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" valign="top">
<row xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">AdcRegs.ADCMAXCONV.all</entry>
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">0x0001</entry>
</row>
<row xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">AdcRegs.ADCCHSELSEQ1.bit.CONV00</entry>
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">0x3</entry>
</row>
<row xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">AdcRegs.ADCCHSELSEQ1.bit.CONV01</entry>
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">0x2</entry>
</row>
<row xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">AdcRegs.ADCTRL2.bit.EVA_SOC_SEQ1</entry>
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">1</entry>
</row>
<row xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">AdcRegs.ADCTRL2.bit.INT_ENA_SEQ1</entry>
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">1</entry>
</row>
</tbody>
</tgroup>
</table>
</para>

<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="adc0">
<note xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">The second and third registers listed select ADCIN3 and ADCIN2 for input channels, respectively.  The first register is set to do one conversion on the sequence.
</note>
</para>

<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="adc5">
The ADC places its results in 16 registers, ADCRESULT0-ADCRESULT15, which are left-justified, meaning that the four least significant bits are reserved.  Each ADCRESULTn register corresponds to one of the ADCINA0-ADCINA7 or ADCINB0-ADCINB7 registers.  
</para>
</section>

<section xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="EVA">
<name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Event Manager A (EVA)"</name>
<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="eva1">
The event manager peripheral in the DSP includes general-purpose (GP) timers, full-compare/PWM units, capture units, and quadrature-encoder pulse (QEP) circuits.  For the purpose of this lab, we will be using event manager A (EVA) to trigger the SOC sequence in the ADC.
</para>

<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="eva2">
EVA functional diagram:
</para>


<figure xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="fig11">
<media xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" type="image/jpg" src="F2812EVFunctionOverview.jpg"/>
<caption xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Texas Instruments' EVA Functional Overview</caption>
</figure>


<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="eva4">
The following registers need to be set up as:
<table xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" frame="all" id="evatable1">
<tgroup xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" cols="2" align="left" colsep="1" rowsep="1">
<thead xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" valign="top">
<row xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" align="center">Register Name</entry>
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" align="center">Register Value (HEX)</entry>
</row>
</thead>
<tbody xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" valign="top">
<row xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">EvaRegs.T1CMPR</entry>
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">0x00fa</entry>
</row>
<row xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">EvaRegs.T1PR</entry>
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">0x1f4</entry>
</row>
<row xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">EvaRegs.GPTCONA.bit.T1TOADC</entry>
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">1</entry>
</row>
<row xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">EvaRegs.T1CON.all</entry>
<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">0x1043</entry>
</row>
</tbody>
</tgroup>
</table>
</para>
</section>

<section xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="Interrupts">
<name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Interrupts</name>
<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="interrupts1">
Interrupts, as described by Dr. Choi in one of his lab manuals in ELEC 434, provide a mechanism for handling any infrequent or exception event.  The interrupt causes a CPU to make a temporary transfer of control from its current location to another location that services the event.  Variety of sources, internal and external to the CPU, can generate interrupts.  The use of interrupts greatly increases the performance of the CPU by allowing the I/O devices direct and rapid access to the CPU and by freeing the CPU from the task of continually testing the status of its I/O devices.  The I/O devices assert interrupts to request the CPU to start a new I/O operation, to signal the completion of an I/O operation, and to signal the occurrence of hardware and software errors.
</para>

<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="interrupts2">
The F2812 DSP supports one nonmaskable interrupt (NMI) and 16 maskable prioritized interrupt requests (INT1-INT14, RTOSINT, and DLOGINT) at the CPU level.
</para>

<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="interrupts3">
For the purpose of our lab, we will be using interrupts for the ADC and the SPI. 
</para>
</section>
</section>

<section xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="lab">
<name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Lab Exercise</name>
<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="lab1">
After you have prepared the eZdsp™ F2812 for either the EVM or the audio processing daughtercard and have read the software section of this lab manual, you are to implement an FIR filter on an audio input signal:

<list xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="lablist1" type="enumerated">
<item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">To design the filter, use MATLAB:

<list xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="matlablist1" type="bulleted">
<item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">‘<code xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">remez</code>’, ‘<code xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">fir1</code>’, and         ‘<code xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">fir2</code>’ are different commands you can use to in order to get coefficients for low-pass, high-pass, and band-pass filters. You can refer to <cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" document="m10917">FIR filtering using Matlab. </cnxn></item>
<item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">After you run one of the commands, you will have to take the two’s complement of the coefficients in order to use in the A/D-D/A conversion.  Use the <link xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" src="http://www.ece.rice.edu/~choi/elec434/matlab/twocomplement.m">twocomplement.m</link> file (written by Dr. H. Choi).  Make sure you divide the coefficients by 2 before taking the two’s complement.</item>

<item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">To make it easy to include the coefficients in your program, you can create assembly files by using <link xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" src="http://www.ece.rice.edu/~choi/elec434/matlab/save_coef.m">save_coef.m</link> file (written by Dr. H. Choi).</item>

<item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">You can view the frequency response by running the ‘<code xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">freqz</code>’ command.</item>
</list>
</item>

<item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">In Code Composer Studio, set up the interrupts for the ADC and SPI.</item>
<item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Write the proper functions for the ADC and SPI to implement the filter:

<list xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="sublist1" type="bulleted">
<item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Two’s complement conversion on the ADC output</item>
<item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Send to filter</item>
<item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Filter’s output should be reconverted to the unsigned integer and then sent to the DAC</item> 
</list>
</item>

<item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">You will probably need to write extra functions to initialize the registers, interrupts, and so forth.</item>  

<item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">If you are using the EVM, test your filter by using an oscilloscope to view the output.  If you are using the audio processing daughtercard, you can test the filter by listening to the output signal.</item>
</list>
</para>
</section>






 
  </content>
  
</document>
