DSP Lab 1 Introduction To DSP Kit and Code Composer Studio
DSP Lab 1 Introduction To DSP Kit and Code Composer Studio
DSP Lab 1 Introduction To DSP Kit and Code Composer Studio
You must have the followings to proceed with the lab exercises. 1.1 Hardware 1. DSP kit based on TMS320C6713 DSP 2. USB cable to connect PC and DSK 3. Power adapter and power cable for DSK 4. Oscilloscope 5. Audio lead to connect DSK with oscilloscope / speaker
1.2
Software Code Composer Studio v3.1 Connect the DSK to Your PC Connect the supplied USB cable to your PC or laptop. Connect the included 5V power adapter brick to your AC power source using the AC power cord. 3. Apply power to the DSK by connecting the power brick to the 5V input on the DSK. 4. When power is applied to the board, the Power On Self Test (POST) will run. LEDs 0-3 will flash. When the POST is complete all LEDs blink on and off then stay on. At this point your DSK is functional. 1. 2.
1.3
1.4
Testing Your Connection If you want to test your DSK and USB connection you can launch the C6713 DSK Diagnostic Utility from the icon on your desktop.
From the diagnostic utility, press the start button to run the diagnostics. In approximately 30 seconds all the on-screen test indicators should turn green. During POST, a 1 kHz
sinusoid is output from the AIC23 codec for 1 second. You can listen this tone on speaker or watch on oscilloscope using appropriate cable.
1.5 Starting Code Composer Studio Launch CCS from the icon on the desktop.
A USB enumeration process takes place. Then CCS will be opened and the LEDs will turn off. Select Debug : Connect menu item. This will establish a connection between your PC and the DSP kit. The symbol at the left bottom of the window will change from Not Connected to Connected.
Connected
Quick Test of DSK Select GEL : Check DSK : Quick Test from the menu. The quick test can be used for confirmation of correct operation and installation. The following message is then displayed: Switches: 15 Board Revision: 2 CPLD Revision: 2 This assumes that the four dip switches (0, 1, 2, 3) are all in the up position. Change the switches to (1110)2 so that the last three switches (1, 2, 3) are up and press the first switch (0) down. Repeat the procedure to select GEL : Check DSK : Quick Test and verify that the value of the switches is now 14 (with the display Switches: 14). You can set the value of the four user switches from 0 to 15.
1.7 1. 2. 3.
Running an existing project in CCS Create a folder with your name in D:\ drive. This is your working folder for DSP labs. Browse to locate Lab1 folder in the instructors share folder. Copy Lab1 in your working folder. Open the project Lab1.pjt from your folder, using Project :Open menu item. Double clicking on Lab1.pjt(Debug) make the components of the project visible. Open the file main.c under Source subfolder.
4.
5.
Project window
6.
7. 8. 9.
Select Project : Build menu item. This will build the project and create a hex file Lab1.out in the Debug folder. This file is the one that will be executed by the DSP. Select Debug : Connect from the menu. Select File : Load Program from the menu. This will open up a window to allow you to select Lab1.out and copy the file onto memory of DSP. When the .out file is loaded into DSP memory, the DSP is ready to execute the program. Press button or select Debug : Run from the menu to execute the program on DSP. You will see a message Hello World in the Stdout (standard output) window. If the processor is still running, halt it. Use button or Debug : Halt.
10. 11.
12. 13.
If you wish to re-run the program, select Debug : Restart menu item and run the program using Debug : Run. Select Debug : Reset from the menu. This is the software reset of DSK. Now you will not be able to run the program without loading it (step 7) again.
Assignment 1 Modify the program to print a table of 17 like this. Use for-loop. 17 x 1 = 17 17 x 2 = 34 .. 17 x 10 = 170