You are on page 1of 3

12 Program to Verify Linear Convolution of a periodic sequences using Code Composer Studio

Aim: To write a program to verify Linear Convolution of a periodic sequences using Code Composer
Studio
Equipment Required: A Computer
Software Required: Code Composer Studio v3 or higher
Procedure:

 Open Code Composer Studio v3 software


 Connect the DSP TMS320C6713 Kit to the CCS software
 Create an project, type in the code in a source file
 Add Source file, Library file, Command file to your project
 Compile and Build program
 Load project and Simulate program
 Check outputs at ‘Stdout’ window and verify the same at Memory
 Give appropriate inputs for Graphs Visualization
 Verify the input and output values stored in the memory of the DSP Kit

Program Code:
/* Program to Verify Linear Convolution of a periodic sequences using Code Composer Studio */

#include<stdio.h>
#include<math.h>
int m=4; //length of the input sample sequence
int n=4; //length of the impulse sequence
int i=0,j;
int x[4]={1,2,3,4}; // input sample sequence
int h[4]={4,3,2,1}; //impulse sample sequence at the end of the samples pad ‘ m’ and ‘n ‘ zeros
int y[20];
main()
{
int i;
for(i=0;i<m+n-1;i++)
{
y[i]=0;
for(j=0;j<=i;j++)
y[i]+=x[j]*h[i-j];
}
/*displaying the result*/
for(i=0;i<m+n-1;i++)
printf("%d\n",y[i]);
}

Output:
The linear convolution output is {4,11,20,30,20,11,4}

Department of ECE 1 SVPCET, Puttur


Graph Visualization:
Input:

Output:

Department of ECE 2 SVPCET, Puttur


Result:

Department of ECE 3 SVPCET, Puttur

You might also like