Vous êtes sur la page 1sur 17

EXPERIMENT#03

TMS 320C6713 DSK and Graph plotting in Code Composer Studio V6.0

Objectives:

Purpose of this lab is to familiarize students with input and output ports of DSP kit and to
explore the CCS V6.0 properties.

Equipment/Tool:

 Code composer Studio CCS V6.0


 DSP kit DSK 6713
Procedure:

Part I – Introduction to TMS 320C6713 DSK

The hardware experiments in the DSP lab are carried out on the Texas Instruments
TMS320C6713 DSP Starter Kit (DSK), based on the TMS320C6713 floating point DSP running
at 225 MHz. The basic clock cycle instruction time is 1/(225 MHz)= 4.44 nanoseconds. During
each clock cycle, up to eight instructions can be carried out in parallel, achieving up to 8×225 =
1800 million instructions per second (MIPS). The C6713 processor has 256KB of internal
memory, and can potentially address 4GB of external memory.

Figure 3.1. Architecture of TMS 320C6713 DSK


The DSK board includes a 16MB SDRAM memory and a 512KB Flash ROM. It has an on-
board 16-bit audio stereo codec (the Texas Instruments AIC23B) that serves both as an A/D and
a D/A converter. There are four 3.5 mm audio jacks for microphone and stereo line input,
speaker and head-phone outputs. The AIC23 codec can be programmed to sample audio inputs at
the following sampling rates:
fs = 8, 16, 24, 32, 44.1, 48, 96 kHz

The DSK also has four user-programmable DIP switches and four LEDs that can be used to
control and monitor programs running on the DSP.

Figure 3.2: Block diagram of TMS 320C6713 DSK

Setting Up the Apparatus:

1. Connecting DSP Kit to power supply to turn on the kit.


2. Connecting DSP kit to PC using USB connection for communication with CCS (Code
Composer Studio).
3. Check the LED lights on the kit to confirm the status of kit (working or not). You can
also confirm it kit is attached to your PC by checking the attached devices from control
panel.
All features of the DSK are managed by the CCS, which is a complete integrated development
environment (IDE) that includes an optimizing C/C++ compiler, assembler, linker, debugger,
and program loader. The CCS communicates with the DSK via a USB connection to a PC. In
addition to facilitating all programming aspects of the C6713 DSP, the CCS can also read signals
stored on the DSP’s memory, or the SDRAM, and plot them in the time or frequency domains.

Part II – Code Composer Studio V6.0

3.1 Creating a New Project under CCS

You should press "File", "New", and "CCS Project" to create a new project under CCS V6.0 as
shown in Figure 3.3.

Figure 3.3: Creating a New Project Under CCS V6.1

Select following setting as in Figure 3.4.

 Target file -> C6000


 Project name:
 Compiler version: TI v7.4.7
 Empty project
And select “finish”
Figure 3.4: Defining the Project Name

Click "finish", on right side project explorer will show your newly created project as shown
Figure 3.5.

Figure 3.5: selecting the project type.


3.2 Creating a Target Configuration File

To create a target configuration file for the project, right click on the name of your project on the
project tree. Select "New→Target Configuration File" as in Figure 3.6.

Figure 3.6:Creating a Target Configuration File.

On the configuration window, enter the name of your configuration file with an extension
“xxx.ccxml” as in Figure 3.7. Click on the "Finish" button.

Figure 3.7: Entering the Name of the Configuration file .


Now, select "Spectrum Digital DSK-EVM-eZdsp onboard USB Emulator" on the
connection tab. Select "DSK6713" as the device and click save on the right hand side of the
window as in Figure 3.8.

Figure 3.8: C6713 Target Configurations.

3.3 Creating the Source File

To create the source file, right click on the name of your project on the project tree. Select "New-
>Source File" as in Figure 3.9.

Figure 3.9: Creating the Source File.


On the opening configuration window, enter a name to your source file with an extension “.c” as
in Figure 3.10. Click on "Finish".

Figure 3.10: Entering the Name of the Source File.

As in the previous chapter, there is a simple source code in Figure 3.11.

Figure 3.11: Simple Source Code.

3.4 Running the Source Code

To test these steps, you can start writing the source code given in Figure 3.9. To run this code,
select "Project→Build Project" as in Figure 3.12.
Figure 3.12: Building the Active Project.

If there are no errors in your code, you should see "Build complete sign" in the "Console"
window as in Figure 3.13. Any errors or warnings will be listed in the companion "Problems"
window.

Figure 3.13: Console and Problems Windows.

After building the project, select "Run→Debug " or press F11 as in Figure 3.14

Figure 3.14: Debugging and Active Project.

Now, you should see the "Debug" window in the CCS V6.0 workspace as in Figure 3.15.
Figure 3.15 Debug Window in CCS V6.0 Workspace.

Press the green play button on the "Debug" window and select "Run" to start running your
project as in Figure 3.16.
Figure 3.16 Running the Project.

3.5 Inserting a Break Point

Right click on the row that you want to place a break point. Select "Toggle Breakpoint" as in
Figure 3.17.

Figure 3.17: Inserting a Breakpoint.

3.6 Adding a Watch Window

Select the variable you want to observe. Right click on it. Select "Add Watch Expression" as in
Figure 3.18. You can observe the variable in the watch window as shown in Figure 3.19.

Figure 3.18: Adding a Watch Window.


Figure 3.19: Observing the Variable in the Watch Window.

3.7 Plots

To see an array in a graph, you should go to "Tools→Graph→Single Time" as in Figure 3.20.

Figure 3.20: Plotting an Array.

On the “Graph” properties window (as in Figure 3.21), fill:


i. Start Address: Name of the array (to be plotted).
ii. Acquisition Buffer Size: Size of the array.
iii. Display Data Size: Size of the data to be displayed on the graph.
iv. Sampling Rate: Sampling rate of the signal in the array.
For example, to observe the array 'c' in the above demo code, adjust the parameters as in Figure
3.21. The resulting graph will be as in Figure 3.22.

Figure 3.21: Setting Graph Properties.

Figure 3.22: Graph of the Array 'c'.


Lab Task:
1. Create an empty project named as “Fibonacci” in CCS V6.0.

a. Create a new target configuration file.

b. Create a new C source code file. Your code should calculate and save the first 10
elements of the Fibonacci series in an array.

c. Build and Run your project. Observe the graph of the Fibonacci array by using the
graph property of CCS V6.0.

Solution:
1. A new target configuration file.

Creating an empty project:


Creating a Target Configuration file:
2. Create a new C source code file. Your code should calculate and save the first 10
elements of the Fibonacci series in an array.

Creating a C source code:


Code:

3. Build and Run your project. Observe the graph of the Fibonacci array by using the graph
property of CCS V6.0.

Build project:
Graph:

Values:

Vous aimerez peut-être aussi