Professional Documents
Culture Documents
CONTENTS
The C6713 DSK builds on Ti‟s industry-leading line of low cost, easy-to-use DSP
Starter Kit (DSK) development boards. The high performance board features the
TMS320C6713 floating point DSP, capable of performing 1350 million floating point
operations per second(MFLOPS) , the C6713 DSP makes the C6713 DSK the most
powerful DSK development board.
The DSK is USB port interfaced platform that allows efficiently develop and testing
applications for C6713. The DSK consists of a C6713-based printed circuit board that
will serve as a hardware reference design for TI‟s customer‟s product s. With the
extensive host PC and target DSP software support, including bundled TI tools, the
DSK provides ease-of -use and capabilities that are attractive to DSP engineers.
The C6713 DSK has a TMS 320C6713 DSP onboard that allows full speed
verification of the Code Composer Studio. The C6713 DSK provides
A USB interface
SDRAM and ROM
An analog interface circuit for data conversion (AIC)
An I/O port
Embedded JTAG emulation support
Connectors on the C6713 DSK provide DSP external memory interface (EMIF) and
peripheral signals that enable its functionality to be expanded with custom or third
party daughter boards.
The DSK provides a C6713 hardware reference design that can assist in the
development of C6713 based products. In addition to providing a reference for
interfacing the DSP to various types of memories and peripheral interfaces, the design
also address power, clock, JTAG and parallel peripheral interfaces.
The C6713 DSK includes a stereo codec. The analog interface circuit (AIC) has the
following characteristics:
12 S- compatible interface requiring only one McBSP for both ADC and DAC
Standard 12S MSB or LSB justified – Data Transfers
16/20/24/32- Bit Word Length
The 6713 DSK is a low-cost standalone development platform that enables customers
to evaluate and develop applications for the TI C67XX DSP family. The DSP also
serves as a hardware reference design for the TMS320C6713 DSP. Schematics, logic
equations and application notes are available to ease hardware development and
reduce time to market.
The DSK uses the 32bit EMIF for the SDRAM (CE0) and daughtercard expansion
interface ( CE2 and CE3). The Flash is attached to CE1 of the EMIF in 8-bit mode.
An on-board AIC23 codec allows the DSP to transmit and receive analog signals.
McBSP0 is used for the codec control interface and McBSP1 is used for data. Analog
audio I/O is done through four 3.5mm audio jacks that correspond to microphone
input, line input, line output and headphone output. The codec can select the
microphone or line input as the active input. The analog output is driven to both the
line out (fixed gain) and headphone (adjustable gain) connectors. McBSP1 can be re-
routed to the expansion connectors in software.
A programmable logic device called CPLD is used to implement glue logic that ties
the board components together. The CPLD has a register based user interface the lets
the user configure the board by reading and writing to the CPLD registers. The
registers reside at the midpoint of CE1.
The DSK include 4 LEDs and 4 DIP switches as a simple way to provide the user
with interactive feedback. Both are accessed by the reading and writing to the CPLD
register.
An included 5V external power supply is used to power is used to power the board.
On-board voltage regulators provide 1.26V DSP core voltage, 3.3V digital and 3.3V
analog voltages. A voltage supervisor monitors the internally generated voltage and
will hold the board in reset until the supplies are within operating specifications and
the reset button is released. If desired, JP1 and JP2 can be used as power test points
the core and I/O power supplies.
Code Composer communicates with the DSP through an embedded JTAG emulator
with a USB host interface. The DSK can also be used with an external emulator
through the external JTAG connector.
Code Composer is the DSP industry‟s first fully integrated development environment
(IDE) with DSP- specific functionality. With a familiar environment like MS- based
C++, Code composer lets you edit, build, debug, profile and manage projects from a
single unified environment. Other unique features include graphical signal analysis,
injection/extraction of data signals via file I/O, multi-processor debugging, automated
testing and customization via a C-interpretive scripting languages and much more.
IDE
Debug IDE
Advanced watch windows
Integrated editor
File I/O, probe points and graphical algorithm scope probes
Advanced graphical signal analysis
Interactive profiling
Automated testing and customization via scripting
Visual project management system
Compile in the background while editing and debugging
Multi-processor debugging
Help on the target DSP
Project New
5. To compile
Project Compile file ( or use icon or ctrl+F7 )
6. To build or link
File Load Program <select the .out file in debug folder in project folder>
1. Keep the cursor on the line from point to start single step debugging.
To set the break point click icon from tool bar menu.
6. Now press F10. See the changes happening the watch window
7. Similarly go to view & select CPU registers to view the changes happening in
CPU registers.
8. Repeat steps 2 to 6
Experiment no 1
AIM
PROCEDURE
1. Open Code Composer Setup and select C6713 simulator, click save and quit
2. Start a new project using „Project New‟ pull down menu, save it in a
separate directory (D:\My projects) with file name lconv.pjt
3. Create a new source file using File New Source file menu and save it in
the project folder(linear.c)
4. Add the source file (linear.c) to the project
Project Add files to Project Select linear.c
5. Add the linker command file hello.cmd
Project Add files to Project
(path: C:\CCstudio\tutorial\dsk6713\hello\hello.cmd)
6. Add the run time support library file rts6700.lib
Project Add files to Project
(path: C\CCStudio\cgtools\lib\rts6700.lib)
7. Compile the program using „project Compile‟ menu or by Ctrl+F7
8. Build the program using „project Build‟ menu or by F7
9. Load the linear.out file (from project folder lcconv\Debug) using
File Load Program
10. Run the program using „Debug Run‟ or F5
11. To view the output graphically
Select View Graph Time and Frequency
12. Repeat the steps 2 to 11 for circular convolution
PROGRAM
Linear Convolution
#include<stdio.h>
#define LENGTH1 6
#define LENGTH2 4
int x[LENGTH1+LENGTH2-1]={1,2,3,4,5,6,0,0,0};
int h[LENGTH1+LENGTH2-1]={1,2,3,4,0,0,0,0,0};
int y[LENGTH1+LENGTH2-1];
main()
{
int i=0,j;
for(i=0;i<LENGTH1 + LENGTH2-1;i++)
{
y[i]=0;
for(j=0;j<=i;j++)
y[i]+=x[j]*h[i-j];
}
for(i=0;i<LENGTH1 + LENGTH2-1;i++)
printf("%d\n",y[i]);
}
RESULT
1 4 10 20 30 40 43 38 24
Circular convolution
#include<stdio.h>
int m,n,x[30],h[30],y[30],i,j,temp[30],k,x2[30],a[30];
void main()
{
printf("Enter the length of 1st sequence\n");
scanf("%d",&m);
printf("Enter the length of 2nd sequence\n");
scanf("%d",&n);
printf("Enter the 1st sequence\n");
for(i=0;i<m;i++)
scanf("%d",&x[i]);
printf("Enter the 2nd sequence\n");
for(j=0;j<n;j++)
scanf("%d",&h[j]);
if(m-n!=0)
{
if(m>n)
{
for(i=n;i<m;i++)
h(i)=0;
n=m;
}
for(i=m;i<n;i++)
x[i]=0;
m=n;
}
y[0]=0;
a[0]=h[0];
for(j=1;j<n;j++)
a[j]=h[n-j];
for(i=0;i<n;i++)
y[0]+=x[i]*a[i];
for(k=1;k<n;k++)
{
y[k]=0;
for(j=1;j<n;j++)
x2[j]=a[j-1];
x2[0]=a[n-1];
for(i=0;i<n;i++)
{
a[i]=x2[i];
y[k]+=x[i]*x2[i];
}
}
printf("The circular convolution is \n");
for(i=0;i<n;i++)
printf("%d\t",y[i]);
}
RESULT
Experiment 2
AIM
PROCEDURE
1. Open Code Composer Setup and select C6713 simulator, click save and quit
2. Start a new project using „Project New‟ pull down menu, save it in a
separate directory (D:\My projects) with file name sinewave.pjt
3. Create a new source file using File New Source file menu and save it in
the project folder(sinewave.c)
4. Add the source file (sinewave.c) to the project
Project Add files to Project Select sinewave.c
5. Add the linker command file hello.cmd
Project Add files to Project
(path: C:\CCstudio\tutorial\dsk6713\hello\hello.cmd)
6. Add the run time support library file rts6700.lib
Project Add files to Project
(path: C\CCStudio\cgtools\lib\rts6700.lib)
7. Compile the program using „project Compile‟ menu or by Ctrl+F7
8. Build the program using „project Build‟ menu or by F7
9. Load the sinewave.out file (from project folder lcconv\Debug) using
File Load Program
10. Run the program using „Debug Run‟ or F5
11. To view the output graphically
Select View Graph Time and Frequency
12. Repeat the steps 2 to 11 for square wave
PROGRAM
Sine Wave
#include <stdio.h>
#include <math.h>
float a[500];
void main()
{
int i=0;
for(i=0;i<500;i++)
{
a[i]=sin(2*3.14*10000*i);
}
}
Square wave
#include <stdio.h>
#include <math.h>
int a[1000];
void main()
{
int i,j=0;
int b=5;
for(i=0;i<10;i++)
{ for (j=0;j<=50;j++)
{
a[(50*i)+j]=b;
}
b=b*(-1) ;
}
}
RESULT
Sine Wave
Square Wave:
Experiment 3
AIM
To configure the codec TLV320AIC23 for a talk through program using the board
support library
PREREQUISITES
TMS320C6713 DSP starter kit, PC with Code Composer Studio, CRO, Audio source,
Speakers, Signal Generator.
PROCEDURE
PROGRAM
Codec.c
#include"xyzcfg.h"
#include"dsk6713.h"
#include"dsk6713_aic23.h"
RESULT
The Codec TMS320AIC23 Successfully configured using the board support library
and output is verified.
Experiment 4
AIM
PROCEDURE
PROGRAM
Sinewave.c
#include "xyzcfg.h"
#include "dsk6713.h"
#include "dsk6713_aic23.h"
#include <stdio.h>
#include <math.h>
float a[500],b;
DSK6713_AIC23_Config config= DSK6713_AIC23_DEFAULTCONFIG;
void main()
{
int i=0;
DSK6713_AIC23_CodecHandle hCodec;
Int l_output,r_output;
DSK6713_init();
hCodec=DSK6713_AIC23_openCodec(0,&config);
DSK6713_AIC23_setFreq=DSK6713_AIC23_FREQ_48KHZ;
for(i=0;i<500;i++)
{
a[i]=sin(2*3.14*10000*i);
}
while(1)
{
for(i=0;i<500;i++)
{
b=400*a[i];
while(!DSK6713_AIC23_write(hCodec,b));
}
}
DSK6713_AIC23_closeCodec(hCodec);
}
RESULT
The sine wave tone have been successfully generated and obtained through speaker
Experiment 5
AIM
To generate filter coefficients using MATLAB and to implement Audio filter using
DSK6713
PROCEDURE
1. Open Matlab
2. Start Toolboxes Filter Design Filter Design & Analysis Tool
3. Select the filter type and give the order and specifications for the filter and
click Design filter
5. Select export to Coefficient File(ASCII) and save the coefficients as txt file
PROGRAM
#include"xyzcfg.h"
#include"dsk6713.h"
#include"dsk6713_aic23.h"
#define FIR_ORD 20
short fir_filter(Uint32 in,short *in_buff,float *coeff);
float fir_coeff[FIR_ORD+1]={ -0.03076334540056, -0.005410850195565,
0.03739961263014, 0.02059285910535, -0.04315598597689, -0.04556930460411,
0.04761022772871, 0.09663870571612, -0.05042696667111, -0.3229392723481,
0.5652971907268, -0.3229392723481, -0.05042696667111, 0.09663870571612,
0.04761022772871, -0.04556930460411, -0.04315598597689, 0.02059285910535,
0.03739961263014, -0.005410850195565, -0.03076334540056 };
short x_buff[FIR_ORD+1];
DSK6713_AIC23_Config config = DSK6713_AIC23_DEFAULTCONFIG;
void main()
{
DSK6713_AIC23_CodecHandle hCodec;
Uint32 l_input,r_input,l_output,r_output;
DSK6713_init();
hCodec = DSK6713_AIC23_openCodec(0,&config);
DSK6713_AIC23_setFreq(hCodec,DSK6713_AIC23_FREQ_48KHZ);
while(1)
{
while(!DSK6713_AIC23_read(hCodec,&l_input));
while(!DSK6713_AIC23_read(hCodec,&r_input));
l_output=5*fir_filter(l_input,x_buff,fir_coeff);
r_output=5*fir_filter(l_input,x_buff,fir_coeff);
while(!DSK6713_AIC23_write(hCodec,l_output));
while(!DSK6713_AIC23_write(hCodec,r_output));
}
DSK6713_AIC23_closeCodec(hCodec);
}
short fir_filter(Uint32 in, short *in_buff, float *coeff)
{
int out=0;
int i;
for(i=FIR_ORD;i>0;i--)
{
in_buff[i]=in_buff[i-1];
out=out+in_buff[i]*coeff[i];
}
in_buff[0]=in;
out=out+in_buff[0]*coeff[0];
return out;
}
RESULT
The FIR filter has been implemented and the output is verified
Experiment 6
AIM
PROGRAM
RESULT
n=0:0.001:.2;
y=a*sin(2*pi*fc*n-(m*cos(2*pi*fm*n)));
plot(n,y);
title(„FM‟);
xlabel(„TIME‟);
ylabel(„AMPLITUDE‟);
RESULT
enter amplitude = 1
RESULT
Experiment 7
CONVOLUTION
AIM
PROGRAM
RESULT
Experiment 8
FIR FILTERS
AIM
PROGRAM
plot(o/pi,m);
title('1. LPF');
ylabel('Gain(dB)');
xlabel(' Normalised Frequency');
%HIGH PASS FILTER
b=fir1(n,wp,'high',y);
[h,o]=freqz(b,1,256);
m=20*log10(abs(h));
subplot(2,2,2);
plot(o/pi,m);
title('2. HPF');
ylabel('Gain(dB)');
xlabel(' Normalised Frequency');
%BAND PASS FILTER
wn=[wp,ws];
b=fir1(n,wn,y);
[h,o]=freqz(b,1,256);
m=20*log10(abs(h));
subplot(2,2,3);
plot(o/pi,m);
title('3. BPF');
ylabel('Gain(dB)');
xlabel(' Normalised Frequency');
%BAND STOP FILTER
b=fir1(n,wn,'stop',y);
[h,o]=freqz(b,1,256);
m=20*log10(abs(h));
subplot(2,2,4);
plot(o/pi,m);
title('4. BSF');
ylabel('Gain(dB)');
xlabel(' Normalised Frequency');
RESULT
Experiment 9
AIM
PROGRAM
plot(om/pi,an);
ylabel('Phase(radians)');
xlabel('Normalised frequency');
RESULT
HPF
RESULT
BPF
RESULT
BSF
RESULT
Experiment 10
AIM
PROGRAM
LPF
plot(om/pi,an);
ylabel('Phase(radians)');
xlabel('Normalised frequency');
RESULT
HPF
RESULT
BSF
RESULT
Experiment 11
AIM
PROGRAM
LPF
w1=2*wp/fs;
w2=2*ws/fs;
[n,wn]=cheb2ord(w1,w2,rp,rs);
[b,a]=cheby2(n,rp,wn);
w=0:0.01:pi;
[h,om]=freqz(b,a,w);
m=20*log10(abs(h));
an=angle(h);
subplot(2,1,1);
plot(om/pi,m);
ylabel('Gain(dB)');
xlabel('Normalised frequency');
subplot(2,1,2);
plot(om/pi,an);
ylabel('Phase(radians)');
xlabel('Normalised frequency');
RESULT
HPF
RESULT
BPF
RESULT
BSF
RESULT