Digital Signal Processing Reference
In-Depth Information
•
Change the names of
sine_gen.pjt
and
sine_gen.c
to
sine_lookup_poll.pjt
and
sine_ lookup_poll.c
, respectively.
•
Open Project
sine_lookup_poll.pjt
in CCS. When the window
appears that says CCS cannot find the file
sine_gen.c
, select
Ignore
.
Depending upon the drive where you created this new folder, you
might have to include
rts6701. lib
file again.
•
Delete
sine_gen.c
by selecting
sine_gen.c
in left window and press-
ing delete. Add the renamed C source code file
sine_lookup_poll.c
to the project by selecting
Project
.
•
Select
Add Files to Project
, then select
sine_lookup_poll.c
and click
Open
. Also delete the
vectors_11.asm
file and add the other vectors
file,
vectors.asm
, located in your
c:ti\tutorial\dsk6711\Hello1
folder.
Step 2: Building and Running Files
•
In CCS, go to
Build
options. Click on the
Linker
tab and change the
word
sine_gen
in
Debug\sine_gen.out
to
sine_lookup_poll.out
in
the field output filename.
•
In CCS, double click on
sine_lookup_poll.c
in the lefthand window.
Change the C code to the following:
short sine_table[8] = {0,14142,20000,14142,0,-14142,
-20000,-14142};
short loop ;
short amplitude = 1;
void main()
{
loop=0;
comm_poll();
while(1)
{
output_sample(sine_table[loop]);
if (loop < 7) ++loop;
else loop = 0;
}
}
•
Add comments to your code where appropriate and save the file in
CCS.
•
Now, build your project by clicking on the
rebuild all
button (the
button with three red arrows).