<< Chapter < Page | Chapter >> Page > |
In this laboratory you will use a program that gathers data from an A/D converter, processes the data, and outputs to a D/A converter. The signal processing portion will be added by you to perform an echo function. After this laboratory you should:
In the laboratory you will be making a delay function or an echo. To make an echo you will need to delay the data that is coming into the DSP. This is usually accomplished using a buffer that is used to store previous input values. Use a circular buffer to store the input data. The length of the buffer is determined by
In order to implement the delay an array of sufficient size must be defined. When a function is called, the local variables will go onto the stack. The stack is usually small compared to other memory sections. Therefore, the number of local variables for a function is limited. Since the array for storing the previous inputs will be large, the array should be stored somewhere else in memory besides on the stack. If the Memory Model in the build options is set to
Far Aggregate
then the global variables and the local static variables will be put into the
.far
section. This section can be set to the large external memory. Therefore, the array that stores the delay values should be defined as either a
global or static local variable . A static local variable is a variable that is not initialized each time a function is called. The static variable will retain the value it had the last time the function was called. To make a static variable just use the static keyword in front of the variable definition.
static int static_var, static_array[10];
You need to make sure the
.far
section is set to a large memory section. For our project, set it to the SDRAM memory. To change the location of the
.far
section in the project you should:
DSK6713_audio.pjt
DSK6713_audio.tcf
.far
section select
SDRAM
DSK6713_audio.pjt
.DSK6713_audio.c
file so that the sampling rate is 8000 Hz and the input is from the microphone.DSK6713_audio.c
so that one channel of output is delayed by 1/2 second. Make sure to define your stored samples array as a global or static array in external memory.DSK6713_audio.c
to implement the fading echo.Notification Switch
Would you like to follow the 'Dsp lab with ti c6x dsp and c6713 dsk' conversation and receive update notifications?