0% found this document useful (0 votes)
5 views16 pages

Dsp Lab Report 5

The document outlines an experiment focused on introducing students to the Digital Signal Processing (DSP) kit, specifically the TMS320C6713. It includes objectives, required equipment, background knowledge on DSPs, programming languages, and detailed instructions for using the Code Composer Studio (CCS) environment to develop and execute programs on the DSP kit. Additionally, it provides an example project demonstrating how to control LEDs based on DIP switch inputs.

Uploaded by

AHMAD MEHMOOD
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views16 pages

Dsp Lab Report 5

The document outlines an experiment focused on introducing students to the Digital Signal Processing (DSP) kit, specifically the TMS320C6713. It includes objectives, required equipment, background knowledge on DSPs, programming languages, and detailed instructions for using the Code Composer Studio (CCS) environment to develop and execute programs on the DSP kit. Additionally, it provides an example project demonstrating how to control LEDs based on DIP switch inputs.

Uploaded by

AHMAD MEHMOOD
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

AIR UNIVERSITY

DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING

EXPERIMENT NO 5

Lab Title: Introduction to dsp kit


Student Name: M Sufyan Tariq Reg. No: 211952
Objective: To get familiarized with dsp kit

LAB ASSESSMENT:

Excellent Good Average Satisfactory Unsatisfactory


Attributes (5) (4) (3) (2) (1)
Ability to Conduct
Experiment
Ability to assimilate the
results
Effective use of lab
equipment and follows the
lab safety rules

Total Marks: Obtained Marks:

LAB REPORT ASSESSMENT:

Excellent Good Average Satisfactory Unsatisfactory


Attributes
(5) (4) (3) (2) (1)

Data presentation

Experimental results

Conclusion

Total Obtained Marks:

Date: 17-10-2024 Signature


Mark

1|Page
LABORATORY
EXPERIMENT NO. 5

INTRODUCTION TO DIGITAL SIGNAL PROCESSING (DSP) KIT


Objectives:

• Introducing students to digital signal processors and digital signal processing kit
TMS320C6713

Equipment required:

• C6713 DSK
• Power Cable
• USB Cable
• Code Composer Studio v5.1.0

Background Knowledge:
A digital signal processor (DSP) is a specific type of microprocessor with optimized architecture for
operational needs of digital signal processing. DSP has features designed to support high-
performance, repetitive, numerically intensive tasks. They are specifically designed to perform
complex arithmetic calculations relatively faster and are often used in applications such as image
processing, speech recognition etc. Most general-purpose microprocessors can execute DSP
algorithms successfully. However, they are not suitable for use in portable devices such as mobile
phones. Digital Signal Processors have approximately the same level of integration and the same
clock frequencies as general purpose microprocessors, but they tend to have better performance,
lower latency, and no requirements for specialized cooling or large batteries. Therefore, DSPs are
comparatively faster, cheaper and are better optimised for specific operations.
Many companies produce DSP chips. The DSP chip being used in this lab is designed and
manufactured by Texas Instruments (TI). DSP chips will be interfaced through Code Composer Studio
(CCS) software developed by TI. In 1983, Texas Instruments released their first generation of DSP
chips, the TMS320 single chip DSP series. The first generation chips (C1x family) could execute an
instruction in a single 200-nanosecond (ns) instruction cycle. The current generation of TI DSPs
includes the C2000, C5000, and C6000 series, which can run up to 8 32-bit parallel instructions in
one 4.44ns instruction cycle, for an instruction rate of 1.8 ∗ 109 instructions per second. The C2000,
and C5000 series are fixed-point processors. The C6000 series contains both fixed-point and floating-
point processors.
Digital Signal Processing can be divided into two categories, fixed-point and floating-point. As the
terms fixed- and floating-point indicate, the fundamental difference between the two types of DSPs
is in their respective numeric representations of data. While fixed point DSP hardware performs
strictly integer arithmetic, floating-point DSPs support either integer or real arithmetic, the latter
normalized in the form of scientific notation.
Fixed point DSPs usually represent each number with a minimum of 16 bits, although a different
length can be used. In unsigned integer, the stored number can take on any integer value from 0 to
65,535. Similarly, signed integer uses two's complement, and the stored number can take any value

2|Page
from -32,768 to 32,767. In comparison, floating point DSPs typically use a minimum of 32 bits to store
each value. All floating point DSPs can also handle fixed point numbers, a necessity to implement
counters, loops, and signals that are input for the DAC from the ADC.
The different families in the TMS320 series are targeted at different applications. The C2000 and
C5000 series of chips are primarily used for digital control. The C6000 series of chips provides both
fixed and floating-point processors that are used in systems that require high performance. These
chips are not as power efficient as the C5000 series of chips; hence they are generally not used in
portable devices. Instead, the C6000 series of chips is used in high quality digital audio applications,
broadband infrastructure, and digital video/imaging etc.
DSP Starter Kit:
The TMS320C6713 DSP chip is very powerful by itself, but to develop programs, a supporting
architecture is required to store programs and data and bring signals on and off the board. In order
to use this DSP chip in a lab or development environment, a circuit board containing appropriate
components, designed, and manufactured by Spectrum Digital, Inc, is provided. Together, CCS, the
DSP chip, and supporting hardware make up the DSP Starter Kit, or DSK.
Programming Languages:
Assembly language was once the most commonly used programming language for DSP but coding in
assembly forces the programmer to manage CPU core registers (located on the DSP chip) and to
schedule events in the CPU core. It is the most time consuming way to program, but it is the only way
to fully optimize a program. The preferred way to code algorithms is to code them in C. Coding in C
requires a compiler that will convert C code to the assembly code of a given DSP instruction set.
Code Composer Studio:
CCS is a powerful integrated development environment that provides a useful transition between a
high-level (C or assembly) DSP program and an on-board machine language program. CCS consists
of a set of software tools and libraries for developing DSP programs, compiling, and linking them into
machine code, and writing them into memory on the DSP chip and on-board external memory. It also
contains diagnostic tools for analysing and tracing algorithms as they are being implemented on-
board. CCS will be used in this lab to develop, compile, and link programs that will be downloaded
from a PC to DSP hardware.
DSK C6713 Key Features:
The C6713 DSK is a low-cost standalone development platform that enables users to evaluate and
develop applications for the TI C67xx DSP family. The DSK also serves as a hardware reference design
for the TMS320C6713 DSP. The DSK comes with a full set of on-board devices that suit a wide variety
of application environments. The C6713 DSP chip is a floating point processor which contains a CPU
(Central Processing Unit), internal memory, enhanced direct memory access (EDMA) controller, and
on-chip peripheral interfaces. These interface include a 32-bit external memory interface (EMIF),
four Multi-channel Buffered Serial Ports (McASP and McBSP) used to communicate with the codec,
two 32-bit timers, and a host port interface (HPI) for high-speed communication between chips in a
multi-DSP system. The block diagram of C6713 DSK is given below:

3|Page
The key features of C713 DSK are:

• A Texas Instruments TMS320C6713 DSP operating at 225 MHz


• An AIC23 stereo codec
• 16 Mbytes of synchronous DRAM
• 512 Kbytes of non-volatile Flash memory (256 Kbytes usable in default configuration)
• 4 user accessible LEDs and DIP switches
• Software board configuration through registers implemented in CPLD
• Configurable boot options
• Standard expansion connectors for daughter card use
• JTAG emulation through on-board JTAG emulator with USB host interface or external
emulator
• Single voltage power supply (+5V)

The DSP on the 6713 DSK interfaces to on-board peripherals through a 32-bit wide EMIF (External
Memory Interface). The SDRAM, Flash and CPLD are all connected to the bus. The DSP interfaces to
analog audio signals through an on-board AIC23 codec and four 3.5 mm audio jacks (microphone
input, line input, line output, and headphone output). The codec can select the microphone or the line
input as the active input. The analog output is driven to both the line out (fixed gain) and headphone
(adjustable gain) connectors. A programmable logic device called a CPLD is used to implement glue
logic that ties the board components together. The CPLD has a register based user interface that lets
the user configure the board by reading and writing to its registers.
The DSK also includes 4 LEDs and a 4 position DIP switch as a simple way to provide the user with
interactive feedback. Both are accessed by reading and writing to the CPLD registers. An included 5V
external power supply is used to power the board. On-board switching voltage regulators provide

4|Page
the +1.26V DSP core voltage and +3.3V I/O supplies. The board is held in reset until these supplies
are within operating specifications. Code Composer communicates with the DSK through an
embedded JTAG emulator with a USB host interface.
Power Supply:
The DSK operates from a single +5V external power supply connected to the main power input (J5).
Internally, the +5V input is converted into +1.26V and +3.3V using separate voltage regulators. The
+1.26V supply is used for the DSP core while the +3.3V supply is used for the DSP's I/O buffers and
all other chips on the board. The power connector is a 2.5mm barrel-type plug. There are three power
test points on the DSK at JP1, JP2 and JP4. All I/O current passes through JP2 while all core current
passes through JP1. All system current passes through JP4. Normally these jumpers are closed. To
measure the current passing through remove the jumpers and connect the pins with a current
measuring device such as a multi-meter or current probe. It is possible to provide the daughter card
with +12V and -12V when the external power connector (J6) is used.
LEDs and DIP Switches:
The DSK includes 4 software accessible LEDs (D7-D10) and DIP switches (SW1) that provide the user
a simple form of input/output. Both are accessed through the CPLD USER_REG register. USER_REG is
used to read the state of the 4 DIP switches and turn the 4 LEDs on or off to allow the user to interact
with the DSK. The DIP switches are read by reading the top 4 bits of the register and the LEDs are set
by writing to the low 4 bits.
Launching DSK:
The DSK is designed to work with TI’s Code Composer Studio development environment and ships
with a version specifically tailored to work with the board. Code Composer communicates with the
board through the on-board JTAG emulator.
Follow the following steps to launch the DSK:

• Connect the DSK to the power supply - wall plug first and then cable to the board. The group
of LEDs should flash several time, finally stopping with all four LEDs lit. This process takes
about 15 seconds and is the board performing a self-test. Note that the board is NOT ready
for use until all four LEDs are lit.
• Connect the board to the USB port on the computer using the supplied USB cable. Use the
computer USB port marked 2.0, located near the top of the computer.

Interfacing CCS with DSK:

• Start Code Composer studio and create a new CCS project in the current workspace. Name
the project and choose the following device specifications:

5|Page
• Click on Finish. A new project will be created and main.c file in CCS Edit perspective is
displayed.

• Right-click on project name in project explorer. Click on Build Options such that:

• In CCS Build, there are multiple settings for C6000 Compiler and C6000 Linker.
• Click on C6000 Compiler Basic Options and in Target Processor Version type 6713.
• Click on C6000 Compiler Include Options and directory to include search path as:

6|Page
• Click on C6000 Compiler Predefined Symbols and add the following pre-defined name:

• Click on C6000 Compiler runtime model options and choose far in both const access model
and data access model.
• Click on C6000 Linker Basic Options and select the stack and heap size to be 0x500.
• Click on C6000 Linker File Search path and include library files as:

• Add directory to library search path as:

• Click on C/C++ General Paths and Symbols and make sure that the following files are included
in the include directories:

• In Libraries section, add the following libraries (if they do not exist already):

7|Page
• Navigate to the current project directory in the workspace and delete the current c6713.cmd
file.
• Now, copy the following files from C:\C6713_support_CCS_V5 to the folder containing current
project:
- C6713dsk.cmd
- c6713dskinit.c
- c6713dskinit.h
- dsk6713 aic23.h
- dsk6713.gel
- Vectors poll.asm if using polling
• In CCS Edit mode, expand Target Configuration folder and double click on Target
Configuration on C6713DSK.ccxml. In basic setup, choose the following options and click
save:

• Click on Advanced tab and make sure the connections are made as given in the figure below:

• Once all these settings are done, write the C language code in main.c file.
• Click on Project Build All.

8|Page
- When CCS built this project, it compiled the C coded source files and header files into
assembly code, using a built-in compiler.
▪ Header files are C coded files that are included into C coded source files. This
is done via pre-processor directives and the purpose of header files is to store
C code that may be useful to many applications and to store function
prototypes.
- Then, it assembled the assembly code into a COFF (common object file format) file
that contains the program instructions, organized into modules.
- Finally, the linker organized these modules and the run-time support library
(rts6700.lib) into memory locations to create the executable .out file. The executable
file is then loaded onto the DSK.
- When .out is loaded onto the DSK, the assembled program instructions, global
variables, and run-time support libraries are loaded to their linker-specified memory
locations.
• Once the project file is build and the errors (if any) are rectified, click on Run Debug. This
displays the CCS Debug perspective.
• Click on Run and Connect Target to establish the connection between the DSP and CCS.
• Click on Run and Load Program from the Run menu. A window which looks something like
this will appear:

• This selection loads the .out file in the DSP memory to be executed by the DSP. Now, in the
debug window click on resume button to execute the program:

• The processor can be suspended by clicking on the pause button and can be halted by clicking
the stop button. To restart the execution, click on Run Restart.
• Click on Run Reset to reset the DSP Kit. To execute the same program again, reload the .out
file to DSP.

Example Project:
9|Page
The DSP can be programmed to turn the LEDs ON and OFF depending on the state of DIP Switch. For
instance, the following code reads the state of DIP Switch 1 and turns the LED ON when it is ON and
vice versa.
To run the program on DSK, include the header files and BSL files in the code as:

• First, include dsk6713.h, dsk6713_dip.h, and dsk6713_led.h files as pre-processor definitions


in the main.c code file.
• Now, in the main file, initialize the board support libraries DSK6713_init.
• Initialize the DIP switches and LED modules of the board support libraries DSK6713_DIP_init
DSK6713_LED_init.

Code:
#include<dsk6713.h>
#include<dsk6713_dip.h>
#include<dsk6713_led.h>
void main()
{
DSK6713_init();
DSK6713_DIP_init();
DSK6713_LED_init();
while(1)
{
if(DSK6713_DIP_get(1)==1)
{
DSK6713_LED_on(1);
}
else
{
DSK6713_LED_off(1);
}

}
}

Follow the steps mentioned above to build the project and the console should look something like
this:

In absence of any errors, load and execute the project using DSP Kit.

10 | P a g e
Lab Tasks:
1. Write a code in CCS to turn an LED ON and OFF depending on the state of corresponding
switch. Load this program on DSK C6713 and display the results.

Code:
#include<dsk6713.h>
#include<dsk6713_dip.h>
#include<dsk6713_led.h>
void main()
{
DSK6713_init();
DSK6713_DIP_init();
DSK6713_LED_init();
while(1)
{
if(DSK6713_DIP_get(1)==1)
{
DSK6713_LED_on(1);
}
else
{
DSK6713_LED_off(1);
}
}
}

11 | P a g e
Output:
Switch 1 on led is on

Fig 1

Switch 1 is pressed(off) led is off

Fig 2

12 | P a g e
2. Write a code in CCS to blink LEDs on DSK in a sequence, such that:
• If switch 0 is pressed the LEDs should blink from left to right.
• If switch 3 is pressed the LEDs should blink from right to left.
• Load this program on DSK C6713 and display the results.

Code:
#include<stdio.h>
#include<dsk6713.h>
#include<dsk6713_dip.h>
#include<dsk6713_led.h>
void PauseFunc()
{
int a, b;
for(a = 1; a<= 4000; a++)
{
for(b=1; b<=4000; b++)
{}
}
}
void main()
{
DSK6713_init();
DSK6713_DIP_init();
DSK6713_LED_init();
while(1)
{
if(DSK6713_DIP_get(0) == 0)
{
DSK6713_LED_on(0);
PauseFunc();
DSK6713_LED_on(1);
PauseFunc();
DSK6713_LED_on(2);
PauseFunc();
DSK6713_LED_on(3);
PauseFunc();
}
else if(DSK6713_DIP_get(3) == 0)
{
DSK6713_LED_on(3);
PauseFunc();
DSK6713_LED_on(2);
PauseFunc();

13 | P a g e
DSK6713_LED_on(1);
PauseFunc();
DSK6713_LED_on(0);
PauseFunc();
}
else
{
DSK6713_LED_off(0);
DSK6713_LED_off(1);
DSK6713_LED_off(2);
DSK6713_LED_off(3);
}
}
}

Output:

When switch 0 is pressed:


Left to right

Fig 3

14 | P a g e
Fig 4

When switch 3 is pressed:


Right to left

Fig 5

15 | P a g e
Fig 6

Conclusion:
In this lab we got familiarized with dsp kit. We wrote and ran two programs on the DSK C6713.
The first program turned an LED on or off depending on the switch. The second program made
the LEDs blink in different directions based on the switches. This showed how to control LEDs
with switches in real-time.

….THE END….
16 | P a g e

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy