Digital Signal Processing LAB 1...

12
Digital Signal Processing LAB 1 REPORT Software initialization and first LED demonstrations Using TMS320C5515 eZDSP TM USB Stick Đại hc Duy Tân Khoa Điện Điện t

Transcript of Digital Signal Processing LAB 1...

Digital Signal Processing

LAB 1 REPORT Software initialization and first LED demonstrations

Using TMS320C5515 eZDSPTM USB Stick

Đại học Duy Tân

Khoa Điện – Điện tử

1 Lab 1 report

February, 27th 2014

Table of Contents

Table of Contents ........................................................... 1

Abstract .......................................................................... 2

Introduction .................................................................... 3

Code Composer Studio Installation steps ...................... 4

Hardware configuration steps ........................................ 5

LEDs display demonstrations.......................................... 6

Conclusion .................................................................... 10

References .................................................................... 11

2 Lab 1 report

February, 27th 2014

Abstract

This report outlines steps to get started with

TMS320C5515 eZDSPTM USB Stick Development

Tool, including Code Composer Studio

installation and hardware configuration. This

report also presents three brief demonstrations

using 4 LEDs of the board.

3 Lab 1 report

February, 27th 2014

Introduction

TMS320C5515 eZDSPTM USB Stick

Development Tool is a small form

factor, very low cost USB-

powered DSP development tool

which includes all the hardware

and software needed to evaluate

the industry’s lowest power 16-

bit DSP : TMS320C5515. C5515

provides a foundation for a range

of signal processing applications,

including voice recorder, musical

instruments, portable medical

solutions and other consumer

electronics in industrial and

security applications. [1]

TMS320C5515 eZdsp™ USB Stick Development Tool

In this subject, we use this tool to study various DSP applications. First of all, we

need to get familiar with related materials including CCS and example library

provided with the tool.

4 Lab 1 report

February, 27th 2014

Code Composer Studio Installation steps 1. Insert the CCSv4 DVD provided with the tool into computer’s disk drive and wait

for the auto-run to start. Alternatively, we can download CCS on www.ti.com to

get the latest version, and then double-click on the setup file. We used the

second method.

2. The installation wizard window pops up. Follow the instructions to go through

the installation steps.

3. Plug the TMS320C5515 eZDSPTM USB Stick into the USB port on laptop.

Window recognizes the hardware and completes the remaining hardware

installation automatically.

4. When installation has finished, double-click the shortcut icon on desktop created

by the wizard. Precise the workspace we wish to store all the project files.

5. Inside the program, go to Help -> Code Composer Studio Licensing Information ->

choose Free license.

5 Lab 1 report

February, 27th 2014

Hardware configuration steps

1. Inside the program, go to View -> Target configurations -> right click on User

Defined -> New Target Configuration -> specify name and location -> Finish.

2. Double-click on the target icon we have just created. Specify the

corresponding setups for TMS320C5515 eZDSPTM USB Stick -> Save.

Hardware configuration for TMS320C5515 eZDSPTM USB Stick in CCS

3. Go to File -> Import -> Existing CCS Eclipse Project -> point to the

library provided with the tool, or downloaded from

http://support.spectrumdigital.com/boards/usbstk5515_v2/reva/files/

usbstk5515_BSL_RevA.zip

4. Go to View -> Project Explorer. A list of example project is shown on

the left of the screen. Click on ‘uled’ project.

5. Go back to Target Configuration window -> right-click on the target file we

have just created -> Link File to Project -> choose ‘uled’.

6 Lab 1 report

February, 27th 2014

LEDs display demonstrations

1. Right-shift 4 OLEDs

Open ‘uled’ project -> choose Debug icon on the toolbar (or press

F11) -> click Resume The 4 LEDs on the board should blink from left

to right, one after another in 6 loops.

4 LEDs blink from left to right demonstration on TMS320C5515 eZDSPTM USB Stick [2]

7 Lab 1 report

February, 27th 2014

We can see the source code for this demonstration in uled_test.c as follows:

#include "usbstk5515.h" #include "usbstk5515_led.h" #include "stdio.h" /* ------------------------------------------------------------------------ * * * * uled_test( ) * * User LED tests toggles each of the four user LEDs 6 times * * * * ------------------------------------------------------------------------ */ Int16 uled_test( ) { Int16 i, j; printf(" User LED tests toggles each of the four user LEDs 6 times\n"); SYS_EXBUSSEL = 0x6000; // Enable user LEDs on external bus USBSTK5515_ULED_init( ); /* Running LED test */ for ( j = 0 ; j < 6 ; j++ ) { for ( i = 0 ; i < 4 ; i++ ) { if ( USBSTK5515_ULED_on( i ) ) // Turn on user LED i return 1; USBSTK5515_waitusec( 50000 ); } for ( i = 0 ; i < 4 ; i++ ) { if ( USBSTK5515_ULED_off( i ) ) // Turn off user LED i return 2; USBSTK5515_waitusec( 50000 ); } } USBSTK5515_ULED_setall( 0x00 ); return 0; }

8 Lab 1 report

February, 27th 2014

2. Left-shift 4 OLEDs Open ‘uled’ project -> double-click on uled_test.c -> modify the loop as

follows:

/* Running LED test */ for ( j = 0 ; j < 6 ; j++ ) { for ( i = 0 ; i < 4 ; i++ ) {

if ( USBSTK5515_ULED_on( 3-i ) ) // Turn on user LED i return 1; USBSTK5515_waitusec( 50000 ); } for ( i = 0 ; i < 4 ; i++ ) {

if ( USBSTK5515_ULED_off( 3-i ) ) // Turn off user LED i return 2; USBSTK5515_waitusec( 50000 ); } }

The 4 LEDs now blink from right to left, one after another in 6 loops.

9 Lab 1 report

February, 27th 2014

3. Flashing a 4-bit counter Open ‘uled’ project -> double-click on uled_test.c -> modify the uled_test

subroutine as follows:

Int16 uled_test( ) { Int16 i, j; printf(" User LED tests toggles each of the four user LEDs 6 times\n"); SYS_EXBUSSEL = 0x6000; // Enable user LEDs on external bus USBSTK5515_ULED_init( ); /* Running LED test */ while (1){ for ( j = 15 ; j >= 0 ; j-- ) { USBSTK5515_ULED_setall(j); USBSTK5515_waitusec( 500000 ); } } return 0; }

The 4 LEDs now become a 4-bit counter with each LED represents one of four bits. The counter

counts up from 0 to 15 and return to 0 to start over again.

10 Lab 1 report

February, 27th 2014

Conclusion

In this lab experiment session, we succeeded to get the Code Composer Studio installed

on our laptops as well as managed to configure CCS to be compatible with

TMS320C5515 eZDSPTM USB Stick. We also succeeded to run our first demonstrations

on the 4 LEDs by modifying the example source codes supplied with the tool.

We can expand further by modifying the example codes to get the 4 LEDs become a 4-

bit counter counting down from 15 to 0, simply by replacing the line

for ( j = 15 ; j >= 0 ; j-- )

by

for ( j = 0 ; j >= 15 ; j++ )

in the uled_test.c file.

11 Lab 1 report

February, 27th 2014

References

[1] Texas Instruments, C5515 eZDSP USB Stick Development Tool description and

features, http://www.ti.com/tool/tmdx5515ezdsp, retrieved on February, 27th 2014.

[2] sensorasia, TMS320C5515_eZdip_USB stick.MP4,

http://www.youtube.com/watch?v=ZFnvH1iZoY8, retrieved on February, 27th 2014.

Illustrating images of C5515 eZDSP USB Stick Development Tool are taken from

http://www.ti.com.

All source codes in this report are taken from the usbstk5515_v1 library associated with

C5515 eZDSP USB Stick Development Tool, provided by Spectrum Digital Inc..