Digital Signal Processing Reference
In-Depth Information
/* gain.gel Create slider and vary amplitude (gain) of sinewave*/
menuitem "Sine Gain"
slider Gain(10,35,5,1,gain_parameter) /*incr by 5,up to 35*/
{
gain = gain_parameter; /*vary gain of sine*/
}
FIGURE 1.6. GEL file to slide through different gain values in the sine generation program
( gain.gel ).
FIGURE 1.7. Slider window for varying the gain of generated sine wave.
verify that the frequency generated is still 1 kHz. Increase the slider to 33 and
verify that you are no longer generating a 1-kHz sine wave. The table values,
scaled by the gain value, are now between
±
33,000 (beyond the acceptable
range by the codec).
Changing the Frequency of the Generated Sinusoid
1. Change the sampling frequency from 8 to 16 kHz by setting f s in the C source
program to DSK6713_AIC23_FREQ_16KHZ. Rebuild (use incremental
build) the project, load and run the new executable file, and verify that the
frequency of the generated sinusoid is 2 kHz. The sampling frequencies
supported by the AIC23 codec are 8, 16, 24, 32, 44.1, 48, and 96 kHz.
2. Change the number of points in the lookup table to four points in lieu of eight
points—for example, {0, 1000, 0,
1000}. The size of the array sine_table
and the loop index also need to be changed. Verify that the generated
frequency is f
-
F s /(number of points).
Note that the sinusoid is no longer generated if the dip switch #0 is not
pressed. If a different dip switch such as switch #3 is desired (in lieu of switch
#0), the BSL functions DSK6713_DIP_get(3) , DSK6713_LED_on(3) , and
DSK6713_LED_off(3) can be substituted in the C source program.
=
Search WWH ::




Custom Search