You have no items in your shopping cart.

Subtotal: 0.00

Interpolation using TMS320C6745 DSP

Aim

To perform the Interpolation 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.

Interpolation is a method of constructing new data points within the range of a discrete set of known data points.

Upsampling is the process of increasing the sampling rate of a signal. For instance, upsampling raster images such as photographs means increasing the resolution of the image.

The upsampling factor (commonly denoted by L) is usually an integer or a rational fraction greater than unity. This factor multiplies the sampling rate or, equivalently, divides the sampling period. For example, if compact disc audio is upsampled by a factor of 5/4 then the resulting sampling rate goes from 44,100 Hz to 55,125 Hz.

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 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 input vector values: 10 ⇒ Enter.

14. Enter sampling value: 2 ⇒ Enter.

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

The Value of output ty[1]=1
The Value of output ty[2]=0
The Value of output ty[3]=2
The Value of output ty[4]=0
The Value of output ty[5]=3
The Value of output ty[6]=0
The Value of output ty[7]=4
The Value of output ty[8]=0
The Value of output ty[9]=5
The Value of output ty[10]=0
The Value of output ty[11]=6
The Value of output ty[12]=0
The Value of output ty[13]=7
The Value of output ty[14]=0
The Value of output ty[15]=8
The Value of output ty[16]=0
The Value of output ty[17]=9
The Value of output ty[18]=0
The Value of output ty[19]=0
The Value of output ty[20]=0
***ALL Tests Passed***

Program

#include

int tx[50],th[50],ty[50];

void main()
{
	int ta,tb,tc,td;
	int ti,tj,txx,tcc,tz;

		printf("\n Enter the input vector values:");
		scanf("%d",&ta);

		printf("\n Enter sampling value:");
		scanf("%d",&tb);

		printf("Enter values for i/p x(n):\n");
		for(ti=1;ti<=ta;ti++)
		scanf("%d",&tx[ti]);

		tc = tb - 1;
		txx = 0;

		for (ti=1;ti<=ta;ti++)
		{
			ty[ti+txx] = tx[ti];
			tcc = ti+txx;
			tz = ti;
			for (tj = 1 ; tj<=tc ;tj++)
			{
				ty[tcc+1] = 0;
				ti = ti+1;
				tcc = tcc+1;
		    }
		    txx = tcc-tz;
		    ti = ti-tc;
		}
		    
	    td = ta*tb;
		for(ti=1;ti<=td;ti++)
		printf("\n The Value of output ty[%d]=%d",ti,ty[ti]);
	    	printf( "\n***ALL Tests Passed***\n" );
}

Result

Thus, the Interpolation of given discrete sequence was performed and the result is stored and displayed in console window.