How can I load this matlab code on my board DSK6713

I have this code:
%start
b=1;
for k=1:100
x=linspace(0,24000,2400);
w=wavrecord(4800,48000,1);
ff=(abs(fftshift(fft(w))));
j=1;
for i=2401:4800
fft2(j)=ff(i);
j=j+1;
end
j=1;
for i=1:2400
fft3(j)=fft2(i);
if j==1
j=j+9;
else
j=j+10;
end
end
s1=0;
for i=500:1100
s1=s1+fft3(i);
end
s2=0;
for i=300:400
s2=s2+fft3(i);
end
s3=0;
for i=401:500
s3=s3+fft3(i);
end
s4=0;
for i=1150:1400
s4=s4+fft3(i);
end
s5=0;
for i=3000:5000
s5=s5+fft3(i);
end
s6=0;
for i=5000:23000
s6=s6+fft3(i);
end
s7=0;
for i=900:1000
s7=s7+fft3(i);
end
s8=0;
for i=800:900
s8=s8+fft3(i);
end
s9=0;
for i=700:800
s9=s9+fft3(i);
end
s10=0;
for i=600:700
s10=s10+fft3(i);
end
c1=s1/s2;
c2=s1/s3;
c3=s1/s4;
c4=s1/s5;
c5=s1/s6;
c6=s7/s1;
c7=s8/s1;
c8=s9/s1;
c9=s10/s1;
ID1=0;
if c1>30
ID1=ID1+1;
end
if c2>30
ID1=ID1+1;
end
if c3>30
ID1=ID1+1;
end
if c4>30
ID1=ID1+1;
end
if c5>30
ID1=ID1+1;
end
if (c6>=0.6 && c6<=1)
ID1=ID1+1;
end
if (c7>=0.6 && c7<=1)
ID1=ID1+1;
end
if (c8>=0.6 && c8<=1)
ID1=ID1+1;
end
if (c9>=0.6 && c9<=1)
ID1=ID1+1;
end
if ID1>3
ID(b)=1;
else
ID(b)=0;
end
b=b+1;
end
%finish
Well, i need load this code on my dsk 6713 starter kit. Furthermore I want the audio to be captured by a microphone plugged into the mic in of my board. Note: on my code i'm using the function wavrecord.
Finally, I need some LED turns on when the ID variable of my code is equal to 1
Is this possible? I'm trying to do this for a long time but have not had success.
Note: My Matlab version: R2011b
My Code Composer version: 3.3
The communication between them is working on Windows XP.
My board: Texas InstrumentsTMDSDSK6713
DSP Starter Kit Developed Jointly With Spectrum Digital

Answers (0)

Categories

Find more on Instrument Control Toolbox in Help Center and File Exchange

Asked:

on 22 Oct 2012

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!