You are currently viewing Decimation using TMS320C6745 DSP

Decimation using TMS320C6745 DSP

Spread the love

Aim

To perform the Decimation of given discrete sequence in TMS320C6745 KIT

Requirements

☞CCS v4

TMS320C6745 KIT

☞USB Cable

☞5V Adapter

Theory

Multi-rate signal processing studies digital signal processing systems which include sample rate conversion. Multirate signal processing techniques are necessary for systems with different input and output sample rates, but may also be used to implement systems with equal input and output rates.

The process of changing the sampling rate of a signal (resampling) is called downsampling if the sample rate is decreased and upsampling if the sample rate is increased. Integer rate changes are far more common than non-integer rate changes.

In signal processing, downsampling (or “subsampling”) is the process of reducing the sampling rate of a signal. This is usually done to reduce the data rate or the size of the data.

The downsampling factor (commonly denoted by M) is usually an integer or a rational fraction greater than unity. This factor multiplies the sampling time or, equivalently, divides the sampling rate. For example, if compact disc audio at 44,100 Hz is downsampled to 22,050 Hz before broadcasting over FM radio, the bit rate is reduced in half, from 1,411,200 bit/s to 705,600 bit/s, assuming that each sample retains its bit depth of 16 bits. The audio was therefore downsampled by a factor of 2.

Procedure for build a project on Decimation using TMS320C6745 DSP

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 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. Enter the No of input vector: 10

14. Enter sampling value : 2

15. Enter values for i/p x(n): – 1 2 3 4 5 6 7 8 9 0

☞The first order decimation values are y[1]=1

☞The first order decimation values are y[2]=3

☞The first order decimation values are y[3]=5

☞The first order decimation values are y[4]=7

☞The first order decimation values are y[5]=9

☞***ALL Tests Passed***

Program for Decimation using TMS320C6745 DSP

#include 
#include 
#include 

int x[100],h[100],y[100],c1[100],y1[100];

void main()
{
	int a,b,d;
	int i,j,z;
	

		printf("\n Enter the No of input vector:");
		scanf("%d",&a);
	
		printf("\n Enter sampling value:");
		scanf("%d",&b);
	
		printf("Enter values for i/p x(n):\n");
		for(i=1;i<=a;i++)
		scanf("%d",&x[i]);
	
		

j = 1;
		for (i=1;i<=a;i++)
		{
			y[i] = x[j];
			j = j+b;
		}
	
	    	d = a/b;
		z = round(d);
		for(i=1;i<=z;i++)
		printf("\n The first order decimation values are y[%d]=%d",i,y[i]);
		printf( "\n***ALL Tests Passed***\n" );
}

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.