Digital Signal Processing Reference
In-Depth Information
one could be processing code.] Upon interrupt, execution proceeds to ISR, “ser-
vices” the necessary task dictated by ISR, then returns to the calling function waiting
for the occurrence of a subsequent interrupt.
1. Within the function output_sample , support functions from the BSL are
included to write data using the two serial ports: McBSP0 for control and
McBSP1 for data transfer ( MCBSP _ write ). Most of the programs in the topic
will output using 16 bits. In this fashion, output_sample is made to default
to the left 16-bit channel and no adapter need be used (see the comments in
C6713dskinit.c). Otherwise, one would need to use output_right_sample .
2. Within the function comm_intr , the following tasks are performed.
(a) Initialize the DSK.
(b) Configure/select INT11.
(c) Enable the specific interrupt.
(d) Enable the global enable interrupt (GIE) bit and the nonmaskable
interrupt.
(e) Initiate communication.
The interrupt functions called for the tasks above are within the board and chip
support files included with CCS.
Create and build this project as loop_intr . The main C source file is in the
folder loop _ intr . Use the same support files as in Example 1.2: the vector file for the
interrupt-driven and linker command file located in the folder support , and the run-
time support, board support, and chip support library files that can be added with
the building option for the linker.
Input a sinusoidal waveform to the LINE IN connector on the DSK, with an
amplitude of approximately 2 V p-p and a frequency between approximately 1 and
3 kHz. Connect the output of the DSK, LINE OUT to a speaker or to an oscillo-
scope and verify a tone of the same input frequency, but attenuated to approxi-
mately 0.8 V p-p. Using an oscilloscope, the output is a delayed version of the input
signal.
Increase the amplitude of the input sinusoidal waveform beyond 6 V p-p and
observe that the output signal becomes distorted.
Input with Gain
To adjust the gain of the left line-input channel, the corresponding header support
file c6713dskinit.h of the communication/init “black box” file needs to be modified
slightly. First, copy this header file AND c6713dskinit.c from the support folder into
the folder loop_intr so that you do not modify the original header file . Remove the
init file from the project and replace it with the one in the folder loop_intr . This will
keep the original init support file unchanged in the folder support . Modify the set-
up register 0, which controls the left input volume, from 0x0017 to 0x001c in order
to increase the left line-input volume.
Search WWH ::




Custom Search