Hi guys,
I am using Code Composer 3.1 for my final year project and I tried to generate a random noise using Chassaing book’s , “Digital Signal Processing and Applications with the C6713 and C6416 DSK”, example of “Noise_gen”
When I rebuild the project the following error displayed
“"Noise_gen.c", line 3: fatal error: could not open source file "DSK6713_AIC23.h"
On my Pc “include” and “lib” files are located in C:\CCStudio_v3.1\C6000\dsk6713\include and C:\CCStudio_v3.1\C6000\dsk6713\lib
So, I use the “project build option” and added the include search path for the pre-processor section and also the Library search path for the linker.
The project builds successfully and I got the “Noise_gen.out” in the debug folder. However, when I load the out file to the board I couldn’t hear the noise on the mic out. Whenever I load Chassaing’s exaple of “Noise_gen.out” I can hear the noise but after rebuilding and loading the recent “Noise_gen.out” I couldn’t.
Is this something to do with the library and include path? If so how can I fix it?
The second problem: unable to display the right magnitude of Time domain graph
I used the following setup in graph property dialog to display the noise in Time domain and connected Prob point using “Noise_gen.c” on line 22 at output_sample(prnseq) function
Start Address -Output_sample
Acquisition buffer Size -2048
Index increment- 1
Display data size - 2048
DSP data type - 32-bit signed integer
Sampling arte -8000
Maximum Y-value - 10,000
Part of the code of Noise_gen.c
interrupt void
c_int11()
//interrupt service routine
{
short
prnseq;
//for pseudo-random sequence
if(sreg.bt.b0)
//sequence{1,-1}based on bit b0
prnseq =
-8000;
//scaled negative noise level
else
prnseq =
8000;
//scaled positive noise level
fb =(sreg.bt.b0)^(sreg.bt.b1); //XOR bits 0,1
fb ^=(sreg.bt.b11)^(sreg.bt.b13); //with bits 11,13 ->fb
sreg.regval<<=1;
//shift register 1 bit to left
sreg.bt.b0 =
fb;
//close feedback path
output_sample(prnseq);
//output scaled sequence
return;
//return from interrupt
The out put will be either 1 or 0 and it is scaled by 80000 for display purposes.
So, I am expecting +8000 or -8000. However, the graph always display more of 10,000 and a couple of -10000
Did I miss any setup information? Why the graph displayed the maximum scale (+10000,-10000) rather than displaying 8000 or -8000?
Could you please advise me what I need to do to fix those problems?
Thanks,
Gim