Digital Signal Processing Reference
In-Depth Information
Quick Watch window, which should be displayed on the lower
section of CCS. Type gain , then click on “Add to Watch.” The gain value of
10 set in the program in Figure 1.2 should appear in the Watch window.
2. Change gain from 10 to 30 in the Watch window. Press Enter. Verify that the
volume of the generated tone has increased (with the processor still running
and dip switch #0 is pressed). The amplitude of the sine wave has increased
from approximately 0.8 V p-p to approximately 2.5 V p-p.
3. Change gain to 33 (as in step 2). Verify that a higher-pitched tone exists,
which implies that the frequency of the sine wave has changed just by chang-
ing its amplitude. This is not so. You have exceeded the range of the codec
AIC23. Since the values in the table are scaled by 33, the range of these values
is now between
1. Select View
Æ
±
33,000. The range of output values is limited from
-
2 15
to
(2 15
32,767.
Since the AIC23 is a stereo codec, we can send data to both 16-bit chan-
nels within each sampling period. This is introduced in Chapter 2. This can be
useful to experiment with the stereo effects of output signals. In Chapter 7,
we use both channels for adaptive filtering where it is necessary to input one
type of signal (such as noise) on one 16-bit channel and another signal (such
as a desired signal) on the other 16-bit channel. In this topic, we will mostly
use the codec as a mono device without the need to use an adapter that is
required when using both channels.
-
1), or from
-
32,768 to
+
Applying the Slider Gel File
The General Extension Language (GEL) is an interpretive language similar to (a
subset of) C. It allows you to change a variable such as gain, sliding through differ-
ent values while the processor is running. All variables must first be defined in your
source program.
1. Select File
Load GEL and open the file gain.gel , which you retained
from the original folder, sine8_LED (that you backed up). Double-click on
the file gain.gel to view it within CCS. It should be displayed in the Files
window. This file is shown in Figure 1.6. By creating the slider function gain
shown in Figure 1.6, you can start with an initial value of 10 (first value) for
the variable gain that is set in the C program, up to a value of 35 (second
value), incremented by 5 (third value).
2. Select GEL
Æ
Gain. This should bring out the Slider window
shown in Figure 1.7, with the minimum value of 10 set for the gain.
3. Press the up-arrow key to increase the gain value from 10 to 15, as displayed
in the Slider window. Verify that the volume of the sine wave generated has
increased. Press the up-arrow key again to continue increasing the slider,
incrementing by 5 up to 30. The amplitude of the sine wave should be about
2.5 V p-p with a gain value set at 30. Now use the mouse to click directly on
the Slider window and slowly increase the slider position to 31, then 32, and
Æ
Sine Gain
Æ
Search WWH ::




Custom Search