Digital Signal Processing Reference
In-Depth Information
•
Click on the highlighted field under the label
Name
, type in the
variable name f0, and press Enter. In the field under the label
Value
,
you should see the number 1000, which is the frequency of the
observed sinusoid.
•
Click on the value 1000 and change it to 2000. You should see a 2 kHz
sinusoid on the oscilloscope. Note that the processor was still running.
•
Repeat above procedure for amplitude and increase the amplitude.
Do not increase amplitude beyond 32767. The range of output values
is limited from -32768 to + 32767 due to 16-bit codec. Do not attempt
to send more than 16 bits to codec. The on-board codec uses a 2's
complement format. Verify the increase in amplitude.
Step 4: Applying the Slider Gel File
The General Extension Language (gel) is an interpretive language similar to
C. It allows you to change a variable such as amplitude, sliding through
different values while the processor is still running. All variables must first
be defined in your program.
•
Select
File
>
Load gel
and open
amplitude.gel
that you created
earlier.
•
Select
gel
>
Sine Amplitude
. This should bring out a
slider window
with a minimum value of 10000 set for amplitude.
•
Press
up-arrow
key to increase amplitude or use mouse to move
the slider amplitude value. Verify the increase in amplitude on the
oscilloscope.
•
Two sliders can be readily used — one to increase amplitude and
the other to change frequency.
7.2.6
Experimenting with the 'C6711 DSK as a Sine Wave Generator
Exercise 4: This experiment tests the 'C6711 DSK as a sine wave generator
using polling and consists of three steps given below. Please follow the
instructions carefully to complete the experiment.
This section has three purposes: to demonstrate how to reuse a previously
created project, to create a real-time communication link between the CPU
and codec using
polling
, and to generate a sinusoid using a
lookup table
.
To create the project
sine lookup_poll
, follow these instructions:
Step 1: Creating, Deleting, and Adding Files
•
Create a folder in Windows Explorer to store this project (e.g., create
the folder
c:\ti\myprojects\sine_lookup_poll
).
•
Copy the files
sine_gen.pjt
and
sine_gen.c
, from the previous project,
into your newly created folder.