You have no items in your shopping cart.

Subtotal: 0.00

DFT 4 POINT
 
Aim

To perform the 4 point DFT process from a given discrete sequence in TMS320F2812 KIT.


Requirements


 
Theory

The sequence of N complex numbers x0, ..., xN−1 is transformed into another sequence of N complex numbers according to the DFT formula

DFT formula

It transforms one function into another, which is called the frequency domain representation, or simply the DFT, of the original function (which is often a function in the time domain).


The DFT requires an input function that is discrete. Such inputs are often created by sampling a continuous function, such as a person's voice. The discrete input function must also have a limited (finite) duration, such as one period of a periodic sequence or a windowed segment of a longer sequence. Unlike the discrete time Fourier transform (DTFT), the DFT only evaluates enough frequency components to reconstruct the finite segment that was analyzed. The inverse DFT cannot reproduce the entire time domain, unless the input happens to be periodic. Therefore it is often said that the DFT is a transform for Fourier analysis of finite-domain discrete-time functions.


Procedure

Note: Once you install the Code Composer Studio v 3.3 software, the two icons will display in desktop


  • Setup Code Composer Studio v3.3
  • Code Composer Studio

1. Open Setup Code Composer Studio v3.3.


2. In System Configuration, select the board then → Remove all → yes.


  • In family, select C28xx.
  • In platform, select xds100 usb emulator.
  • In Endianness, select little.
  • Select F2812 XDS100 USB Emulator → add → save & quit → no.

Note: The above two steps only for first time to setup the processor in CCS.


3. Open Code Composer Studio v3.3.


4. Project → New.


  • Project name: type the project name.
  • Location: Browse, select the project location .
  • Project Type: Executable(.out)
  • Target: TMS320C28XX. Finish.

5. File → New → Source file.


  • Type the program in untitled window.

6. File → Save.


  • Browse our project location then type our project name.c ( .c extension is must) save.

Paste the following two cmd files in our project folder.


  • F2812_EzDSP_RAM_lnk.cmd
  • DSP281x_Headers_nonBIOS.cmd
  • DSP281x_GlobalVariableDefs.c

8. Project → Add files to project.,


  • In file of type : All files
  • Ctrl + Select the following files
          projectname.c
           DSP281x_GlobalVariableDefs.c
           F2812_EzDSP_RAM_lnk.cmd
           DSP281x_Headers_nonBIOS.cmd open.

9. Project → Build Option.


In compiler tab, select Preprocessor


  • Include search path(-i): C:\tidcs\c28\DSP281x\v120\DSP281x_headers\include

In linker tab, select libraries


  • Search path(-i): C:\CCStudio_v3.3\C2000\cgtools\lib
  • Incl libraries(-l): rts2800_ml.lib.

In linker tab, select Basic


  • Stack Size(-stack): 0x400 ok.

10. Project → Build (or) Rebuild all.


11. Connections for TMS320F2812 KIT



12. Debug → connect.


13. File → Load Program → Browse and select the projectname.out file → open


14. Debug → Go main.


15. View → memory


  • Enter An Address :0x3F9100 Enter.
  • Type the input.

For example

0x3F9100 – 0x0001
0x3F9101 – 0x0001
0x3F9102 – 0x0001
0x3F9103 – 0x0000

16. Debug → Run.


17. Debug → Halt


18. See the output at following location, View → memory


Enter An Address:0x3F9110 → Enter.


For example

0x3F9110 – 0x0003
0x3F9111 – 0x0000
0x3F9112 – 0x0001
0x3F9113 – 0xFFFF (-1)

19. View → memory


Enter An Address:0x3F9120 → Enter.

0x3F9120 – 0x0000
0x3F9121 – 0xFFFF (-1)
0x3F9122 – 0x0000
0x3F9123 – 0x0000
Program
#include "DSP281x_Device.h"

 

#define xn 4

#define hn 4

 

void main()

{

        int *xval,*outval,j;

        int n,k,i,t[100]={0};

 

        xval = (int *)0x003F9100;  /* input  */

        outval = (int *)0x003F9200; /* output */

 

        for(i=0;i<(xn+hn-1);i++)

        {

                outval[i] = 0;

                t[i]=0;

                xval[xn+i]=0;

        }

       

        for(i=0,j=(hn-1);i<(hn);i++,j--)

                t[i] = xval[j];

 

        for(n=0;n<(xn+hn-1);n++)

        {

                for(k=0;k<=n;k++)

                        outval[n] = (outval[n])+((xval[k])*(t[n-k]));

        }

        while(1);   

}
Result

Thus, the 4 point DFT of given discrete sequence has performed and the result is stored at memory location(0x3F9110 & 0x3F9120).