Beruflich Dokumente
Kultur Dokumente
Introduction
The hardware experiments in the DSP lab are carried out on the Texas Instruments TMS320C6713 DSP Starter Kit (DSK), based on the TMS320C6713 floating point DSP running at 225 MHz. The basic clock cycle instruction time is 1/(225 MHz)= 4.44 nanoseconds. During each clock cycle, up to eight instructions can be carried out in parallel, achieving up to 8225 = 1800 million instructions per second (MIPS). All features of the DSK are managed by the CCS, which is a complete integrated development environment (IDE) that includes an optimizing C/C++ compiler, assembler, linker, debugger, and program loader. The CCS communicates with the DSK via a USB connection to a PC.
Task 2:- Generation of a concatenated signal; having 1 kHz, 3kHz and 1 kHz signals as the input for the first 3 seconds Lab Objective:
In this task, our aim was to produce a 1KHz and 3KHz signals, then we would have to concatenate them in such a manner that for the 1st second,1KHz signal is at the output, for the 2nd second, 3KHz signal is at the output and for the 3rd second, again 1KHz signal is at the output.
{ output_sample(sine_table8[loop]*gain); //output sine values if (count<24000) { out_buffer[i] = sine_table24[loop]*gain; output_sample(out_buffer[i]); i++; count++; //increment buffer count if(i==BUFFERLENGTH) i=0; //if @ bottom reinitialize counter if (loop < 23) ++loop; //check for end of table else loop = 0; } if (count>= 24000 && count<48000) { out_buffer[i] = sine_table8[loop]*gain; output_sample(out_buffer[i]); i++; count++; //increment buffer count if(i==BUFFERLENGTH) i=0; //if @ bottom reinitialize count if (loop < 7) ++loop; //check for end of table else loop = 0; } if (count>= 48000 && count<72000) { out_buffer[i] = sine_table24[loop]*gain; output_sample(out_buffer[i]); count++; i++; //increment buffer count if(i==BUFFERLENGTH) i=0; //if @ bottom reinit count if (loop < 23) ++loop; //check for end of table else loop = 0; } //reinit table index return; //return from interrupt } void main() { comm_intr();//init DSK, codec, McBSP while(1); //infinite loop
long count = 0;
if(count < 24000) { output_sample(sine_table[loop]*gain*pulse[loop]); //output sine values out_buffer[loop] = sine_table[loop]*gain*pulse[loop]; count++; if (loop < 23) ++loop; else {loop = 0;} } //check for end of table
if(count >= 24000 && count < 48000) { output_sample(sine_table1[loop]*gain*pulse[loop]); //output sine values out_buffer[loop+23] = sine_table1[loop]*gain*pulse[loop]; count++; if (loop < 23) ++loop; //check for end of table
else {loop = 0;} } if(count >= 48000 && count < 72000) { output_sample(sine_table[loop]*gain*pulse[loop]); //output sine values out_buffer[loop+23+24] = sine_table[loop]*gain*pulse[loop]; count++; if (loop < 23) ++loop; else {loop = 0;} } if(count == 72000) count = 0; //return from interrupt } //check for end of table
void main() { comm_intr(); while(1); } //init DSK, codec, McBSP //infinite loop