Skip to content Skip to navigation


You are here: Home » Content » eZdsp F2812 Tutorial


Recently Viewed

This feature requires Javascript to be enabled.

eZdsp F2812 Tutorial

Module by: Deania Fernandez. E-mail the author

Summary: This module will demonstrate how to use Spectrum Digital's eZdsp F2812 to implement a finite impulse response (FIR) filter on an audio input.


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:

  1. TI's Multi-Converter EVM using the TLV5638 DAC
  2. An audio processing daughtercard

FIR Filtering

Before you begin, review the basics of digital filtering.

Introduction to the eZdsp™ F2812

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.

The eZdsp™ F2812 has the following features:

  • TMS320F2812 DSP
  • 150 MIPS operating speed
  • 18K words on-chip RAM
  • 128K words on-chip Flash memory
  • 64K words off-chip SRAM memory
  • 30 MHz clock
  • 2 Expansion Connectors (analog, I/O)
  • Onboard IEEE 1149.1 JTAG Controller
  • 5-volt only operation with supplied AC adapter
  • Onboard IEEE 1149.1 JTAG emulation connector

Figure 1
eZdsp™ F2812 Block Diagram from Spectrum Digital's Datasheet
eZdsp™ F2812 Block Diagram from Spectrum Digital's Datasheet (eZdspF2812BlockDiagram.jpg)


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.

Getting Started

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.

Soldering Connectors 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.

Figure 2
(a) P8 Header on the eZdsp Board(b) P9 Header on the EVM
Figure 2(a) (SPIHeader.jpg)Figure 2(b) (AnalogHeader.jpg)

You will also need to solder a wire from pin 13 (GND) to pin 18 (VREFLO) on header P9 for proper ADC operation.

Your eZdsp™ setup should look like this:

Figure 3: eZdsp Setup
Figure 3 (eZdsp_setup.jpg)

Multi-Converter Evaluation Module (EVM)

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.

Setting up the EVM 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:

Table 1
Pin No. Header P8 Pin No. Header J11
19 GND 1 GND
20 GND 3 GND
It should look something like this:

Figure 4: J11 Header with Wires on the EVM
Figure 4 (EVMHeader.jpg)

After this, the boards are now set to communicate with each other:

Figure 5: eZdsp F2812 and EVM Setup
Figure 5 (EVM_eZdspSetup.jpg)

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:

Figure 6: EVM Power LED
Figure 6 (EVMPower.jpg)

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:

Table 2
SW1-1 Off
SW1-2 On
SW1-3 Off
SW1-4 Off

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”.

Figure 7: User Mode LED
Figure 7 (UserModeLED.jpg)

The board is now ready to receive signals.

Audio Processing Board

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.

Figure 8
Audio Processing Daughtercard
(a) Front of the Board(b) Back of the Board
Figure 8(a) (AudioFront.jpg)Figure 8(b) (AudioBack.jpg)

A simplified block diagram of the system is shown in the following figure:

Figure 9: Audio Processing Board Block Diagram
Figure 9 (AudioDaughtercardBlockDiagram.jpg)

Soldering 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™:

Figure 10: Headers on the eZdsp for the Audio Daughtercard
Figure 10 (eZdspHeadersforAudio.jpg)

Once you are done with that, then all you have to do is join the two boards together through the headers:

Figure 11
(a) Side View of the Mounted Boards(b) Audio Daughtercard Mounted on the eZdsp
Figure 11(a) (Audio_eZdspHeaders.jpg)Figure 11(b) (AudioMountedoneZdsp.jpg)

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.

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 ‘+’.

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:

Figure 12: Total Hardware Setup
Figure 12 (TotalAudioSetup.jpg)

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.

Controls 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.


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.

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.

Serial Peripheral Interface (SPI)

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.

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 3
Register Name Register Value (HEX)
SPICCR.all 0x005F
SPICTL.all 0x001F
SPISTS.all 0x0000
SPIBRR.all 0x0002
SPIFFTX.all 0xC028
SPIFFRX.all 0x0028
SPIFFCT.all 0x00
SPIPRI.all 0x0010


The FIFOs are enabled and the SPI is interrupt driven. You also control the bit transfer rate in the SPI baud rate register (SPIBRR).

Analog-to-Digital Converter (ADC)

The F2812 DSP has a 12-bit ADC core with built-in dual sample-and-hold (S/H). It provides options for:

  • Simultaneous sampling or sequential sampling mode
  • Operating as two independent 8-state sequencers or as a one large 16-state sequencer
  • 16-channel, multiplexed inputs
  • Multiple source triggers for the start-of-conversion (SOC) sequence

A block diagram of the ADC module:

Figure 13: Texas Instruments' ADC Block Diagram
Figure 13 (F2812ADCBlockDiagram.jpg)

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 4
Register Name Register Value (HEX)
AdcRegs.ADCMAXCONV.all 0x0001
AdcRegs.ADCCHSELSEQ1.bit.CONV00 0x3
AdcRegs.ADCCHSELSEQ1.bit.CONV01 0x2
AdcRegs.ADCTRL2.bit.EVA_SOC_SEQ1 1
AdcRegs.ADCTRL2.bit.INT_ENA_SEQ1 1


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.

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.

Event Manager A (EVA)"

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.

EVA functional diagram:

Figure 14: Texas Instruments' EVA Functional Overview
Figure 14 (F2812EVFunctionOverview.jpg)

The following registers need to be set up as:

Table 5
Register Name Register Value (HEX)
EvaRegs.T1CMPR 0x00fa
EvaRegs.T1PR 0x1f4
EvaRegs.T1CON.all 0x1043


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.

The F2812 DSP supports one nonmaskable interrupt (NMI) and 16 maskable prioritized interrupt requests (INT1-INT14, RTOSINT, and DLOGINT) at the CPU level.

For the purpose of our lab, we will be using interrupts for the ADC and the SPI.

Lab Exercise

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:

  1. To design the filter, use MATLAB:
    • remez’, ‘fir1’, and ‘fir2’ 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 FIR filtering using Matlab.
    • 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 twocomplement.m file (written by Dr. H. Choi). Make sure you divide the coefficients by 2 before taking the two’s complement.
    • To make it easy to include the coefficients in your program, you can create assembly files by using save_coef.m file (written by Dr. H. Choi).
    • You can view the frequency response by running the ‘freqz’ command.
  2. In Code Composer Studio, set up the interrupts for the ADC and SPI.
  3. Write the proper functions for the ADC and SPI to implement the filter:
    • Two’s complement conversion on the ADC output
    • Send to filter
    • Filter’s output should be reconverted to the unsigned integer and then sent to the DAC
  4. You will probably need to write extra functions to initialize the registers, interrupts, and so forth.
  5. 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.

Content actions

Download module as:

Add module to:

My Favorites (?)

'My Favorites' is a special kind of lens which you can use to bookmark modules and collections. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need an account to use 'My Favorites'.

| A lens I own (?)

Definition of a lens


A lens is a custom view of the content in the repository. You can think of it as a fancy kind of list that will let you see content through the eyes of organizations and people you trust.

What is in a lens?

Lens makers point to materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

Who can create a lens?

Any individual member, a community, or a respected organization.

What are tags? tag icon

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

| External bookmarks