You are on page 1of 9

EL – 413 Digital Signal Processing

Experiment # 10

Introduction of TMS320C6713 DSP starter Kit (DSK)


and Generation of Sine Wave Generation with DIP Switch Control

Performed on:

Student Name:
Roll Number: Section: E

Maximum Marks Performance = 05 Viva = 05 Total = 10

Marks Obtained

Remarks (if any)

Experiment evaluated by

Instructor Name: Engr. Muhammad Waseem Zeeshan Ashrafi

Signature:

Copyright © Department of Electrical Engineering – Usman Institute of Technology


Objective
Introduction of TMS320C6713 DSP starter Kit (DSK) and Generation of Sine Wave Generation
with DIP Switch Control

Required Equipment:
Software: Code Composer studio 3.1 and 6713 DSK Diagnostic tool
Hardware: TMS320C6713 DSP starter Kit (DSK) and Headphones

Introduction to DSP kit:


The TMS320C6713 DSP Starter Kit (DSK) developed jointly with Spectrum Digital is a low-
cost development platform designed to speed the development of high precision applications
based on TI´s TMS320C6000 floating point DSP generation. The kit uses USB
communications for true plug-and-play functionality. Both experienced and novice designers
can get started immediately with innovative product designs with the DSK´s full featured
Code Composer Studio™ IDE and express DSP™ Software which includes DSP/BIOS and
Reference Frameworks.

TI DSP Families:
 Low cost, Fixed-Point, 16-bit (for control):
o TMS320C1x, ’C2x, ’C20x, ’C24x
 Power Efficient, Fixed-Point, 16-Bit (for wireless phones and modems):
o ’C5x, ’C54x, ’C55x
 High Performance DSP’s (DSL, Imaging, Video…):
o ’C62x, ’C64x (16-bit fixed-point)
o ’C3x, ’C4x,’ C67x (32-bit floating-point)

TI DSP Application:

Fixed vs. Floating Point


DSP’s
 Fixed Point DSP’s (Modems, Controllers, Phones…)
o Cheaper,
o Consume less power,
o Need special care when programming to avoid overflows,
o More dominant in the market.
 Floating Point DSP’s (DSL, Video, Imaging…)
o Easier to program,
o Complex architecture (more computationally demanding)
o More expensive.
TMS320C6713 DSK Block Diagram:

DSK Features
 Has a TMS320C6713 DSP operating
at 225 MHz.
 VLIW (Very Long Instruction
Word) CPU Core that
takes
advantage of parallelism (ILP).
Fetches 8 32-bit instructions at once
(total of 256 bits).
 AIC32 stereo codec line with Line
In, Line Out, MIC and headphone
jacks to interface with analog audio
signals that are sampled and
digitized so it can be processed by
DSP.

Test on DSK TMS320C6713 starter kit

Code Composer Studio:


CCS provides an IDE to incorporate the software tools. CCS include tools for code generation,
such as a C compiler, an assembler, and a linker. It has graphical capabilities and support real-
Time debugging. It provides an easy-to-use software tool to build and debug programs.

Use the USB cable to connect the DSK board to the USB port on the PC. Use the 5V power
supply included with the DSK package to connect to the +5 -V power connector on the DSK
to turn it on. The CCS icon should be on the desktop as “C6713DSK CCS” and is used to
launch CCS. The code generation tools (C compiler, assembler, and linker) are used
with CCS version3.1.

Quick Test of DSK:


Turn ON power and connect kit to PC using USB cable. Click on 6713dsk diagnostic icon on
desktop to apply Power On Self- Test on the dsp kit. It tests the internal, external, and flash
memories, the two multichannel buffered serial ports (McBSP), direct memory access
(DMA), the on board codec, and the LEDs. If all tests are successful, all four LEDs blink
three times
Copyright © Department of Electrical Engineering – Usman Institute of Technology
and stop (with all LEDs on). During the testing of the codec, a 1- kHz tone is generated for 1
sec.

Launch CCS from the icon on the desktop. Then CCS will be opened and the LEDs will turn
off. Click on GEL then Check DSK then Quick Test. The quick test can be used for
confirmation of correct operation and installation. The following message is then displayed:
Switches:15
BoardRevision:1
CPLDRevision:2

Support Files:
The following support files located in the folder support (except the library files) are used for
most
of the examples and projects discussed in this book:

1. C6713 dsk init.c: contains functions to initialize the DSK, the codec, the serial ports,
and for I/O. It is not included with CCS.

2. C6713 dsk init.h: header file with function prototypes. Features, such as those used to
select them microphone input in lieu of line input (by default), input gain, and soon are
obtained from this header file (modified from a similar file included with CCS).

3. C6713dsk.cmd: sample linker command file. This generic file can be changed when
using external memory in lieu of internal memory.

4. Vectors_intr.asm: anodized version of a vector file included with CCS to handle


interrupts. Twelve interrupts, INT4 through INT15, are available, and INT1 1is selected
within this vector file. They are used for interrupt-driven programs

5. Vectors_poll.asm: vector file for programs using polling.

Copyright © Department of Electrical Engineering – Usman Institute of Technology


6. rts6700.lib, dsk6713bsl.lib, csl6713.lib: run-time, board, and chip support library files,
respectively. These files are included with CCS and are located in C6000\ cgtools
\lib ,C6000\dsk6713\lib, and c6000\bios\lib, respectively.

Example #01: (Generation of 8kHz Sine wave using single DIP switch)
Creating a Project
This experiment illustrates how to create a project, adding the necessary files to generate
an executable file sine8_LED.out. a file named sine8_LED.pjt is already exist at
c:\CCStudio_v3.1\MyProjects\sine8_LED. However, for the purposes of gaining
familiarity with CCS, this experiment will illustrate how to create that project file from
scratch.
1. Launch CCS by double - clicking on its desktop icon.

2. Make a quick test on the DSK.

3. Create a new project file sine8_LED.pjt by selecting Project→ New and


typing sine8_LED as the project name, as shown in Figure1. Set Target to
TMS320C67XX before clicking on Finish. The new project file will be saved in
the folder c:\CCStudio_v3.1\Myprojects\sine8_LED.
The. pjt file stores project information on build options, source filenames, and
dependencies. The names of the files used by a project are displayed in the
Project View window, which, by default, appears at the left - hand side of the
Code Composer window.

Figure 1: CCS Project creation window for project sin8_LED

4. Add the source file sine8_LED.c to the project.


sine8_LED.c is the top level C source file containing the definition of function
main(). This source file is stored in the folder sine8_LED and must be added to the
project if it is to be used to generate the executable file sine8_LED.out. Select
Project→ Add Files to Project and look for Files of Type C Source Files (* .c, *
.ccc). Open, or double - click on, sine8_LED.c. It should appear in the Project
View
window Source folder.

5. Add the source file c6713dskinit.c to the project. This source file is stored in the
folder c:\CCStudio_v3.1\Myprojects\Support. Select Project→ Add
Files to Project and look for Files of Type C Source Files ( * .c, * .ccc). Open , or
double - click on,c6713dskinit.c . It should appear in the Project View window in
the Source folder.

Copyright © Department of Electrical Engineering – Usman Institute of Technology


6. Add the source file vectors poll.asm to the project.
This source file is stored in the folder
c:\CCStudio_v3.1\myprojects\Support. Select Project→ Add
Files to Project and look for Files of Type ASM Source Files (* .a *). Open, or
double - click on, vectors_poll.asm. It should appear in the Project View
window in the Source folder.

7. Add library support files rts6700.lib, dsk6713bsl.lib, and csl6713.lib to the


project.
Three more times, select Project→ Add Files to Project and look for Files
of Type Object and Library Files (* .o * , * .l * ). The three library files are
stored in folders c:\CCStudio_v3.1\c6000\cgtools\lib, c:\
CCStudio_v3.1\c6000\dsk6713\lib,
and c:\CCStudio_v3.1\c6000\csl\lib, respectively.
These are the run - time support (for C67x architecture), board support (for
C6713 DSK), and chip support (for C6713 processor) library files.

8. Add the linker command file c6713dsk.cmd to the project.


This file is stored in the folder c:\CCStudio_v3.1\myprojects\Support. Select
Project→ Add Files to Project and look for Files of Type Linker Command
File (* .cmd; * .lcf) . Open, or double - click on, c6713dsk.cmd. It should then
appear in the Project View window.

9. No header files will be shown in the Project View window at this stage.
Selecting Project→ Scan All File Dependencies will rectify this. You
should now be able to see header files c6713dskinit.h, dsk6713.h, and
dsk6713_aic23.h , in the Project View window.

10. The Project View window in CCS should look as shown in Figure 2.
Verify from the Project View window that the project ( .pjt ) file, the linker
command ( .cmd ) file, the three library ( .lib ) files, the two C source ( .c )
files, and the assembly ( .asm ) file have been added to the project.

Figure 2: Project View window showing added files

Copyright © Department of Electrical Engineering – Usman Institute of Technology


Code Generation and Build Options
The code generation tools underlying CCS, that is, C compiler, assembler, and linker,
have a number of options associated with each of them. These options must be set
appropriately before attempting to build a project. Once set, these options will be stored
in the project file.

1. Setting Compiler Options


Select Project→ Build Options and click on the Compiler tab. Set the following options,
as shown in Figures 3, 4, and 5. In the Basic category set Target Version to
C671x (- mv6710). In the Advanced category set Memory Models to Far ( – mem_
model:data=far) . In the Preprocessor category set Pre - Defi ne Symbol to CHIP_6713
and Include Search Path to c:\ CCStudio_v3.1 \ C6000 \ dsk6713 \ include. Click on
OK.

Figure 3: CCS Build Option: Basic compiler setting Figure 4: CCS Build Option: Advanced
compiler settings

Figure 5: CCS Build Option: Preprocessor


compiler settings

Copyright © Department of Electrical Engineering – Usman Institute of Technology


2. Setting Linker Options
Click on the Linker tab in the Build Options window, as shown in Figure 6. The
Output Filename should default to .\ Debug \ sine8_LED.out based on the name of the
project file and the Autoinit Model should default to Run - Time Auto initialization.
Set the following options (all in the Basic category). Set Library Search Path to c:\
CCStudio_v3.1 \ C6000 \ dsk6713 \ lib and set Include Libraries to
rts6700.lib;dsk6713bsl.lib;csl6713.lib . The map file can provide useful information
for debugging (memory locations of functions, etc.). The –c option is used to initialize
variables at run time, and the –o option is to name the linked executable output file
sine8_LED.out . Click on OK .

Figure 6: CCS Build Option: Basic linker settings

Building, Downloading and Running the Project


The project sine8_LED can now be built, and the executable file sine8_LED.out can be
downloaded to the DSK and run. Build this project as sine8_LED. You should see a number of
diagnostic messages, culminating in the message “ Build Complete, 0 Errors, 0 Warnings, 0
Remarks ” appear in an output window in the bottom left – hand side of the CCS window.

1. Connect to the DSK . Select Debug→ Connect and check that the symbol in the
bottom left - hand corner of the CCS window indicates connection to the DSK.
2. Select File→ Load Program in order to load sine8_LED.out. It should be stored in
the folder c:\CCStudio_v3.1\MyProjects\sine8_LED\Debug. Select Debug→ Run.
In order to verify that a sinusoidal output waveform with a frequency of 1 kHz is
present at both the LINE OUT and HEADPHONE sockets on the DSK, when DIP
switch #0 is pressed down, use an oscilloscope connected to the LINE OUT socket
and a pair of headphones connected to the HEADPHONE socket

Copyright © Department of Electrical Engineering – Usman Institute of Technology


Using a GEL Slider to Control the Gain
The General Extension Language (GEL) is an interpreted language similar to (a subset
of) C. It allows you to change the value of a variable (e.g., gain) while the processor is
running.
1. Select File → Load GEL and load the file gain.gel (in folder sine8_LED).
2. Select GEL→ Sine Gain → Gain. This should bring out the slider window shown
in Figure 7, with the minimum value of 0 set for the gain.
3. Press the up - arrow key three times to increase the gain value from 0 to 12.
Figure 7: GEL slider used to vary gain

Lab Task:
Generate sinusoidal signals having frequencies 16, 32 and 96kHz using all four DIP switches
Hear the tones in DSP kit and give your comments

Open Ended Task:

Write a program in MATLAB to generate a sinusoidal signal having frequencies of 8,16,32 and
96KHz. Compare these signals (on the basis of hearing) with above signal which generated in the
lab task

Copyright © Department of Electrical Engineering – Usman Institute of Technology

You might also like