Decimation using TMS320C6745 DSP
To perform the Decimation of given discrete sequence in TMS320C6745 KIT.
- CCS v4
- TMS320C6745 KIT
- USB Cable
- 5V Adapter
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.
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
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.
- 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
- The first order decimation values are y=3
- The first order decimation values are y=5
- The first order decimation values are y=7
- The first order decimation values are y=9
- ***ALL Tests Passed***
printf("\n Enter the No of input vector:");
printf("\n Enter sampling value:");
printf("Enter values for i/p x(n):\n");
j = 1;
y[i] = x[j];
j = j+b;
d = a/b;
z = round(d);
printf("\n The first order decimation values are y[%d]=%d",i,y[i]);
printf( "\n***ALL Tests Passed***\n" );
Thus, the Decimation of given discrete sequence was performed and the result is stored and displayed in console window.