Digital Signal Processing Reference
In-Depth Information
(scaled by 1000). Within the function main , another function, comm_poll , is
called that is located in the communication and initialization support file
c6713dskinit.c . It initializes the DSK, the AIC23 codec onboard the DSK, and
the two McBSPs on the C6713 processor. Within c6713dskinit.c , the function
DSK6713_init initializes the BSL file, which must be called before the two sub-
sequent BSL functions, DSK6713_LED_init and DSK6713_DIP_init ,
are
invoked that initialize the four LEDs and the four dip switches.
The statement while (1) within the function main creates an infinite loop.
When dip switch #0 is pressed, LED #0 turns on and the sinusoid is generated.
Otherwise, DSK6713_DIP_get(0) will be false (true if the switch is pressed) and
LED #0 will be off.
The function output_sample , located in the communication support file
C6713dskinit.c , is called to output the first data value in the buffer or table
sine_table[0] =
0. The loop index is incremented until the end of the table is
reached, after which it is reinitialized to zero.
Every sample period T
0.125 ms, the value of dip switch #0 is
tested, and a subsequent data value in sine_table (scaled by gain =
=
1/ F s =
1/8000
=
10) is sent
for output. Within one period, eight data values (0.125 ms apart) are output to gen-
erate a sinusoidal signal. The period of the output signal is T
=
8(0.125 ms)
=
1ms,
corresponding to a frequency of f
=
1/ T
=
1kHz.
Create Project
In this section we illustrate how to create a project, adding the necessary files for
building the project sine8_LED . Back up the folder sine8_LED (change its name)
or delete its content (which can be retrieved from the topic CD if needed), keeping
only the C source file sine8_LED.c and the file gain.gel in order to recreate
the content of that folder. Access CCS (from the desktop).
1. To create the project file sine8_LED.pjt . Select Project
New. Type
sine8_LED for the project name, as shown in Figure 1.3. This project file is
saved in the folder sine8_LED (within c:\c6713\myprojects ). The .pjt
file stores project information on build options,
Æ
source filenames,
and
dependencies.
2. To add files to the project. Select Project
Add Files to Project. Look in the
folder support , Files of type C Source Files. Double-click on the C source
file C6713dskinit.c to add it to the project. Click on the “
Æ
” symbol to the
left of the Project Files window within CCS to expand and verify that this C
source file has been added to the project.
3. Repeat step 2, use the pull-down menu for Files of type, and select ASM
Source Files. Double-click on the assembly source vector file
vectors_poll.asm to add it to the project. Repeat again and select
Files of type: Linker Command File, and add C6713dsk.cmd to the project.
+
Search WWH ::




Custom Search