Dear All,
I'm a beginner in processors and I need help from you :(
The program below is a loop program that recieves a sample and outputs it again.
The programs compiles well,by CCS, but unfortunately the program doesn't do
the task well.
I also tried to plot the output (using a buffer) and the result was a dc at -584
even if the mic is not plugged in the socket.
So please can you tell me what's is the error or there is something I
don't understand.
( see this image: http://up.g4z4.com/uploads/6a2e737794.jpg)
ps: I use TMS320C6711
short out_buffer[2048]; //output buffer
const short BUFFERLENGTH = 2048; //size of output buffer
short i = 0; //for buffer count
interrupt void c_int11(){//interrupt service routine
int sample_data;
sample_data = input_sample(); //input data
output_sample(sample_data); //output data
out_buffer[i] =sample_data; //output to buffer
i++; //increment buffer count
if (i == BUFFERLENGTH) i = 0; //if bottom reinit buffer count
return;
}
void main(){
comm_intr(); //init DSK, codec, McBSP
while(1); //infinite loop
}
Check Out Industry's First Single-Chip, Multi-Format, Real-Time HD Video
Transcoding Solution for Commercial & Consumer End Equipment: www.ti.com/dm6467
small error with TMS320C6711
Started by ●January 23, 2008
Reply by ●January 23, 20082008-01-23
Do you know that c_int11() is running ?
You could start and stop the application and see what value "i" has.
- Andrew E
----- Original Message ----
From: "z...@hotmail.com"
To: c...
Sent: Wednesday, January 23, 2008 1:44:08 PM
Subject: [c6x] small error with TMS320C6711
Dear All,
I'm a beginner in processors and I need help from you :(
The program below is a loop program that recieves a sample and outputs
it again. The programs compiles well,by CCS, but unfortunately the
program doesn't do the task well.
I also tried to plot the output (using a buffer) and the result was a
dc at -584 even if the mic is not plugged in the socket.
So please can you tell me what's is the error or there is something I
don't understand.
( see this image: http://up.g4z4.com/uploads/6a2e737794.jpg)
ps: I use TMS320C6711
short out_buffer[2048]; //output buffer
const short BUFFERLENGTH = 2048; //size of output buffer
short i = 0; //for buffer count
interrupt void c_int11(){//interrupt service routine
int sample_data;
sample_data = input_sample(); //input data
output_sample(sample_data); //output data
out_buffer[i] =sample_data; //output to buffer
i++; //increment buffer count
if (i == BUFFERLENGTH) i = 0; //if bottom reinit buffer count
return;
}
void main(){
comm_intr(); //init DSK, codec, McBSP
while(1); //infinite loop
}
Check Out Industry's First Single-Chip, Multi-Format, Real-Time HD
Video Transcoding Solution for Commercial & Consumer End Equipment:
www.ti.com/dm6467
____________________________________________________________________________________
Never miss a thing. Make Yahoo your home page.
http://www.yahoo.com/r/hs
Check Out Industry's First Single-Chip, Multi-Format, Real-Time HD Video Transcoding Solution for Commercial & Consumer End Equipment: www.ti.com/dm6467
You could start and stop the application and see what value "i" has.
- Andrew E
----- Original Message ----
From: "z...@hotmail.com"
To: c...
Sent: Wednesday, January 23, 2008 1:44:08 PM
Subject: [c6x] small error with TMS320C6711
Dear All,
I'm a beginner in processors and I need help from you :(
The program below is a loop program that recieves a sample and outputs
it again. The programs compiles well,by CCS, but unfortunately the
program doesn't do the task well.
I also tried to plot the output (using a buffer) and the result was a
dc at -584 even if the mic is not plugged in the socket.
So please can you tell me what's is the error or there is something I
don't understand.
( see this image: http://up.g4z4.com/uploads/6a2e737794.jpg)
ps: I use TMS320C6711
short out_buffer[2048]; //output buffer
const short BUFFERLENGTH = 2048; //size of output buffer
short i = 0; //for buffer count
interrupt void c_int11(){//interrupt service routine
int sample_data;
sample_data = input_sample(); //input data
output_sample(sample_data); //output data
out_buffer[i] =sample_data; //output to buffer
i++; //increment buffer count
if (i == BUFFERLENGTH) i = 0; //if bottom reinit buffer count
return;
}
void main(){
comm_intr(); //init DSK, codec, McBSP
while(1); //infinite loop
}
Check Out Industry's First Single-Chip, Multi-Format, Real-Time HD
Video Transcoding Solution for Commercial & Consumer End Equipment:
www.ti.com/dm6467
____________________________________________________________________________________
Never miss a thing. Make Yahoo your home page.
http://www.yahoo.com/r/hs
Check Out Industry's First Single-Chip, Multi-Format, Real-Time HD Video Transcoding Solution for Commercial & Consumer End Equipment: www.ti.com/dm6467