Launch the Debug mode by clicking the icon to load the program into the DSP.Choose Answer: D... Launch the Debug mode by clicking the 11.Press the run button to run the program on the b
UNIT 1 - DSP TRAINER FAMILIARIZATION
EX1: DSP Trainer Familiarization
o DSP Trainer Familiarization: Introduction o Types of Microprocessors o Peculiarities of DSPs o Program Execution
EX2: Overview of the DSP Circuit Board
1.2.1 Discussion: Overview of the DSP Circuit Board o Discussion o The Accessories Section o The DSP and its Peripherals Section
1.2.2 Procedure: Overview of the DSP Circuit Board
In this section, you will begin to familiarize yourself with some of the components and circuit blocks found on the digital signal processor circuit board.
1 Locate, on the digital signal processor circuit board, all the common terminals. With the power OFF and using an ohmmeter, verify if the common terminals are connected together Are all the common terminals connected together?: a yes b no
2 Turn the power supply ON to power the circuit board
3 Using a dc voltmeter, measure the voltage range at the output of the dc source circuit block To do so, vary the potentiometer of the dc source from its smallest to its largest values What is the minimum voltage and maximum voiltage:
4 Connect a microphone to the input of the microphone pre-amplifier and connect the output of the pre-amplifier to the input of the audio amplifier Note: “You can also use earphones if you are in an area where an audio output from the speaker is not desirable
5 While talking into the microphone, familiarize yourself with the use of the potentiometers of the microphone pre-amplifier and of the audio amplifier blocks.
6 Remove all the connections (leads) present on the circuit board
Familiarization with the Circuit Board Using a DSP Program
In this section, you will familiarize yourself with the development environment and you will load and run a program on the DSP.
7 Connect the DSP board to your computer using USB port number 2 on the board and a standard USB port on your computer Make sure that the circuit board power source is turned ON and that the Code Composer software is installed as explained in Appendix C Launch Code Composer on your computer.
8 Make exercise_1_1 the active project simply by clicking on that project in the Project Explorer window Launch the Debug mode by clicking the icon to load the program into the DSP Next, press the icon in the menu where the debug icon was in order to run the program At this point, you should see the following information on the LCD of the DSP circuit board: LabVolt 91031 Ex1-1 Echo Generator.
10.Adjust the DIP switch of the I/O interface so that every bit is in the 0 position. Press the interrupt button so that the LCD displays an Echo Delay 0ms. 11.Using the microphone, input a signal (your voice) into the DSP Adjust the GAIN potentiometers of the pre-amplifier and of the audio amplifier to obtain a good quality of sound at the output Experiment with the potentiometers Note that a series of black rectangles light up on the last line of the LCD as you talk into the microphone The length of that line corresponds to the magnitude of the input signal from the microphone pre-amplifier The program you downloaded into the DSP takes the input from the CODEC (which you connected to the microphone pre-amplifier), displays its amplitude on the LCD, and processes the signal which is then sent to the output of the CODEC (connected to the speaker/headphones). 12.Adjust the DIP switch such that the 8-bit number sent to the DSP corresponds to
15 (or 0000 1111b, that is, 0000 111 in binary) Set the switches corresponding to a one (1) to the I position Press the interrupt button so that the LCD displays an Echo Delay 15ms Notice the effect of the signal processing on the sound of your voice.
13.Repeat the last step with the following DIP switch values:
The echo effect should be quite obvious The echo delay corresponds to the time (in milliseconds) between consecutive echoes.
What is the minimal time required for your brain to perceive distinct repetitions? a Typically 5 to 15 ms b Typically 20 to 80 ms c Typically 100 to 160 ms d Typically 180 to 300 ms
14.Click on the icon (next to the Run icon) to terminate the execution of the program.
In this section, you will experiment with a different program using the same connections.
15.Make exercise_1_1b the active project simply by clicking on that project in the Project Explorer window Launch the Debug mode by clicking the icon to load the program into the DSP Next, press the to run the program At this point, you should see the following information on the LCD of the DSP circuit board: LabVolt 91031 Ex1-1b Echo/Flanger Generator.
16.Experiment with this application Press the and interrupt buttons and modify the value of the DIP switch Speak in the microphone or use a sound signal What is the function of pressing the interrupt button in this application? a To select Voice mode b To select Echo mode c To select Flanger mode d All of the above
What is the function of pressing the interrupt button in this application? a To change the mode e To update the variable (value read from the DIP switch) f To reset the DIP switch g All of the above
17.Click on the icon to terminate the execution of the program Return to the projects tab and quit Code Composer Turn OFF the power supply and remove the connections (leads) you made on the circuit board.
1 Before the DSP circuit board can be used, a few steps must first be taken Which steps must be completed before using the board? a Make certain that the DIP switches of the I/O interface are all in the OFF position b Make certain that a USB connection between the board and the computer is present c Make certain that the power source of the board is turned ON d Both b and c
2 What is the range of the dc voltage source of the DSP board? a -3.3 V to 3.6 V b -3.5 v to 3.5 V c -0.8 V to 0.9 V d -4.4 V to 7.3 V
3 What does the TMS320C5535 chip found on the DSP circuit board use to set the frequency of its master clock? a The DSP uses its 100 MHz internal oscillator. b The DSP uses a 32.768 kHz external oscillator and a phase-locked loop. c The DSP uses the 33.3 MHz oscillator of the CODEC. d The DSP uses the clock of the computer through the USB connection.
4 Which of the following components is usually found in a CODEC? a An anti-aliasing filter b An analog-to-digital converter c A digital-to-analog converter d All of the above
5 Increasing the echo delay has which effect on the signal at the output of the DSP? a It increases the echo effect. b It increases the time between consecutive echoes. c The sound seems more remote. d All of the above
EX3: Integrated Development Environment (IDE) and Project Structure
1.3.1 Integrated Development Environment (IDE) and Project Structure: Discussion o The Code Composer Studio Software o The Code Development Perspective o Project Structure o C Code o Assembly Code o Configuration File o The Debug Perspective o Breakpoints o Registers, Expressions, and Variables Windows
1.3.2 Procedure: Integrated Development Environment (IDE) and Project Structure
1 Connect the output of the DC source to the analog input of the CODEC and the analog output of the CODEC to the audio amplifier as shown Also, connect one channel of your oscilloscope to the analog output of the CODEC.
2 Connect the DSP board to your computer using USB port number 2 on the board and a standard USB port on your computer Make sure that the circuit board power source is turned ON and that the Code Composer software is installed as explained in Appendix C
Launch Code Composer on your computer.
3 Make exercise_1_2 the active project simply by clicking on that project in the Project Explorer window.
4 Launch the Debug mode by clicking the icon to load the program into the DSP.
Do not run the program yet.
5 Where is the memory address identified at which the main function starts? a In the Project Explorer window b In the Debug window at the end of the main() function string c In the Disassembly window at the start of the debug session d Both b and c
6 Go to the Registers tab and look for the Program Counter (PC) register This register is in the Core Registers list Is the value of the PC register the same as the main function starting address? a Yes b No
Press the assembly step into button to go to the next assembly instruction What is the value of the PC register now? a The next sequential address in the program c The main function starting address d The function ending address e None of the above
What does this number correspond to? a The address where the main function started f The address of the current assembly instruction g The total number of program lines h The address of the last assembly instruction
What is the use of the Program Counter register? a To keep track of the total number of instruction addresses in the memory. i To keep track of the total number of programs in the memory. j To keep track of the address of the current instruction in the memory. k All of the above
7 While keeping an eye on the main.c, Disassembly and Variables tabs, experiment
Choose Answer: C with the different debugger step arrows to observe what happens with the debugger and the different variables.
8 Press the run button to run the program on the board Adjust the GAIN potentiometer of the audio amplifier to obtain a sound output of the appropriate volume At this point, you should see the following information on the LCD of the DSP circuit board: LabVolt 91031 Ex1-2 - Sin Generator freq = x Hz (where x is a number).
9 It should be quite obvious by the name on the LCD and by playing with the dc source knob that this application generates a sinusoidal waveform which is heard from the loudspeaker (or earphones) Adjust the potentiometer of the dc source and observe the result on the signal: a The frequency of the signal displayed is modified as the potentiometer is adjusted b The value of the frequency is also modified accordingly on the LCD. c As the frequency changes the audio signal also changes. d All of the above
10.Use an oscilloscope to observe the signal at the analog output of the CODEC. Does the amplitude of the signal change as you change the frequency? a Yes b No
What is the obtainable range of frequency? a The frequency can go from about 1 Hz to 500 Hz ± 5%. c The frequency can go from about 50 Hz to 50 kHz ± 5%. d The frequency can go from about 10 Hz to 5027 Hz ± 5%.
11.Click on the icon to halt the execution of code.
12.A crucial part of debugging is to be able to know the value of a given variable at a given moment in the process This can be done in most cases using the Expressions or Variables tabs Here is a case where this method is not as convenient:
In the main.c file of Exercise 1-2, a table is declared on line 22 like this:
This means that sintbl is a table containing 2048 elements which are all 16-bit
On lines 47 to 51 of the main.c file, a loop calculates a value for each of the elements of the sintbl variable:
// fill sin table for (i=0; i<2048;i++) { sintbl[i]=sin (i/2048.0 * 2.0 *3.14159265) * 32767;
Open the Expressions tab and type sintbl in the field to obtain the values of the sintbl table of integers It is necessary to expand the display to see an element of interest Note the address of the sintbl variable:
13.Another method is to open a Memory window to visualize the data table Go to the View menu of Code Composer and choose Memory Browser to open a new window. sintbl variable = recall(hex1)
Search for the address of the sintbl variable in the Memory window Specify that the looked-after variable is in the DATA part of the memory and that its type is 16-bit signed integer.
The content of the memory can thus be observed in a table such as this:
This is an improvement, but due to the sheer size of the sintbl integer table, a different method should be used.
14.Another method to visualize a large array of data is to use the graphics display tool.
UNIT 2 - ARCHITECTURE
EX02: Data Computation Unit
2.3.1 Discussion: Data Computation Unit o Data Computation Unit: Introduction
Multiply-and-Accumulate Units (MACs)
Barrel Shifter o Basic Instructions o Sign-extension Mode o The MAC: Basic Operations o Operations: Overflow, Underflow, and Saturation Mode o Status Bits o Parallelism
Set Up of the DSP Board
1 Connect the DSP board to your computer using USB port number 2 on the board
Choose Answer: D and a standard USB port on your computer Make sure that the circuit board power source is turned ON and that the Code Composer software is installed as explained in Appendix C
Launch Code Composer on your computer.
2 Make exercise_2_2 the active project simply by clicking on that project in the Project Explorer window Open both the main.c and LVex2_2.asm files of this exercise Launch the Debug mode by clicking the icon to load the program into the DSP.
3 Press the run button to run the program on the board At this point, you should see the following information on the LCD of the DSP circuit board: LabVolt 91031 Ex2-2 and some number conversion information.
4 Adjust the DIP switch of the I/O interface to values of your choice Observe the result on the LCD ou should note that the last two digits of AC0 are related to the position of the DIP switches Click on the icon to halt the execution of code
In the LVex2_2.asm file, locate the MARKER1 identifier
Observe that the content of the AC0 accumulator relates to the value of the DIP switch to which a value is added This value is the number 8111h shifted to the left by 15 bits.
What would be the value shown on the LCD if the assembly instruction: add #8111h