You have no items in your shopping cart.

Subtotal: 0.00

Aim

To Implement the IIR High pass filter using TMS320C6745 KIT.

Requirements

☞CCS v4

TMS320C6745 KIT

☞USB Cable

☞5V Adapter

Theory

Infinite impulse response (IIR) is a property of signal processing systems. Systems with this property are known as IIR systems or, when dealing with filter systems, as IIR filters. IIR systems have an impulse response function that is non-zero over an infinite length of time. This is in contrast to finite impulse response (FIR) filters, which have fixed-duration impulse responses. The simplest analog IIR filter is an RC filter made up of a single resistor (R) feeding into a node shared with a single capacitor (C). This filter has an exponential impulse response characterized by an RC time constant. Because the exponential function is asymptotic to a limit, and thus never settles at a fixed value, the response is considered infinite.

IIR filters may be implemented as either analog or digital filters. In digital IIR filters, the output feedback is immediately apparent in the equations defining the output. Note that unlike FIR filters, in designing IIR filters it is necessary to carefully consider the "time zero" case[citation needed] in which the outputs of the filter have not yet been clearly defined.

Example IIR filters include the Chebyshev filter, Butterworth filter, and the Bessel filter.

Digital filters are often described and implemented in terms of the difference equation that defines how the output signal is related to the input signal:

formula

where

P is the feedforward filter order

bi are the feedforward filter coefficients

Q is the feedback filter order

ai are the feedback filter coefficients

x[i] is the input signal

y[i] is the output signal.

After derived the above equation , finally

Considering that in most IIR filter designs coefficient a0 is 1, the IIR filter transfer function takes the more traditional form:

formula

Procedure

1. Open Code Composer Studio v4 .

2. In WorkSpace Launcher.

BROWSE → Select the project location and make one new folder, MAKE NEW FOLDER → Type the Workspace name, OK → OK.

3. FILE ⇒ NEW ⇒ CCS PROJECT

Project name: Type your project name.

☞Tick use default location. → NEXT

Project type C6000.

☞Tick Debug And Release. → NEXT → NEXT.

Output type: Executable.

Device Variant : generic - TMS320C6745.

Device Endianness : little

Code Generation Tools: TI v6.1.12.

Run time support library: automatic.

Target content: none. →FINISH

4.FILE ⇒ NEW ⇒ SOURCE FILE

Source file: Type your projectname.c( .c extension is must ).

☞Type the program.

FILE → SAVE.

5. Paste the following board library files in workspace location.

☞Common folder (contains header files)

☞Gel folder (contains gel file)

☞Library folder(contains library files)

6. Paste the Linker file in the project location.(linker file is available in cd)

Note: Those folders and linker file are availble at cd.

7. PROJECT ⇒ PROPERTIES ⇒ C/C++ BUILD → BASIC OPTION

☞Target processor version(--silicon version, -mv) : 6400+ OK.

☞IN C/C++ BUILD, INCLUDE OPTIONS (Add dir to #include search path(--include_path,-I)) select this add icon and add the following three path by indivdually - "${Diag}../../common/header" - "${XDAIS_CG_ROOT}/packages/ti/xdais" - "${C6000_CSL_CG_ROOT}/include"

8. FILE ⇒ NEW ⇒ TARGET CONFIGURATION FILE

file name: projectname. ccxml (.ccxml extension is must)

Connection: Texas Instrument XDS100 v1 USB Emulator.

Device: TMS320C6745. (Tick the TMS320C6745)→ SAVE → TARTGET CONFIGURATION → C674X_0 → BROWSE, browse the workspace location, open the gel folder and select the GEL file. → OPEN → SAVE.

9. In C/C++ Project window, Right click the project ⇒ REBUILD PROJECT.

10. Connections

☞Connect the usb cable, PC to TMS320C6745 KIT.

☞Connect the 5v adapter.

☞Power on the kit.

11. TARGET ⇒ DEBUG ACTIVE PROJECT.

12. TARGET ⇒ RUN.

13. Give the input as follow,

Enter order of IIR HP Filter: 2

Enter the Cutoff Freq: 100

14. Output is displayed at Console Window.

15. TARGET ⇒ HALT. (Auto Halt)

Program

 
#include "stdio.h"

#include

int i,w,wc,c,N;

float H[100];

float mul(float, int);

voidmain()

{

printf("\n Enter order of IIR HP Filter: ");

scanf("%d",&N);

printf("\n Enter the Cutoff Freq: ");

scanf("%d",&wc);

for(w=0;w<=100;w++)

{

H[w]=1/sqrt(1+mul((float)wc/w,2*N));

printf("H[%d]=%f\n",w,H[w]);

}

}

float mul(float a,int x)

{

for(i=0;i<x-1;i++)

a*=a;

return(a);

}

Result

Thus, the IIR High pass filter was Implemented and displayed the results in console window.