EE 289 LAB 9 Intro to VAB and the DSP Board Overview Welcome to the world of high technology. In today’s lab, you will learn how to use the software and hardware that you will use throughout EE-171 to experiment with sounds, pictures, video, etc. The software end of the lab is called Visual Application Builder. We will refer to it as VAB. The hardware is called a DSP Starter Kit or DSK. We will refer to it as the DSP. VAB and the DSP have already been installed. The following will tell you a bit about each. We will keep it brief so you can start playing with them right away. VAB The Visual Application Builder, or VAB for short, is the software that makes it very easy to program and experiment with the DSP. Using the VAB is as easy as moving blocks around that tell the DSP what you want to do. Below is an example of what you will see in VAB. Figure 1: Coin Counter PC However, that worksheet is a bit advanced for today. Instead you will see something like this in one of your first labs: Figure 2: Introduction to VAB and the DSP Board The DSP The DSP is the device that does the real work. DSP stands for Digital Signal Processor. (Also Digital Signal Processing). A DSP is no more than a fast inexpensive microprocessor computer that is optimized for DSP. The picture below shows the DSP you will be using. Take a moment to look over the board. Figure 3: The DSP Board You are looking at the ``SPEEDY-33 DSP Board’’ also known as the VC33 DSP Education Kit. It features the TMS320VC33 DSP. For technical details on the Speedy-33, see speedy33_manual.pdf. There are several things on this board that you should observe. They are: 1. On the lower left end of the picture is the connector that attaches to a UCB port of your PC. It should already be attached. VAB programs and runs the DSP through this connection. 2. The silver box in the middle of the board is a crystal. It sets the clock rate for the processor (DSP). The DSP chip has 150 written on the top. That means the processor is running at 150 MHz. This is rather slow compared to computers running at 1000 MHz to 3000 MHz (or 3 GHz), however we will see how this is more than fast enough for this processor to process your voice, music, and even video in real time (that is, as it happens). 3. The biggest thing on the board is the processor or DSP. Texas Instruments (TI) makes this particular DSP. TI makes many different DSPs (and other chips too); the ‘TMS320VC33’ tells which chip this one is. 4. One of the chips is the Audio Interface Controller. Can you find it? Its job is to convert the analog signal from the microphone into a digital form the processor can use. It also takes digital data from the processor and converts it into an analog form the speaker can use. This is often called an analog to digital converter (ADC) and a digital to analog converter (DAC). 5. The two connectors on the right end are for attaching to audio equipment. The lower one (labeled Output) goes to your speakers. The upper one (Input) goes to the microphone. 6. At the bottom of the board is a bank of 8 LEDs . Next to it is a 8 bit input switch bank for 8 bits of digital I/O. The digital I/O can be easily programmed. 7 The two small round devices at the top left and top right are onboard microphones. 8. Right below the DSP is the flash memory. Once the flash is programmed, the board can be ``unplugged’’ from the PC, powered, and run by itself in a stand-alone mode for live demonstrations and real-world proof-of-concept applications. 9. The `reset’ button is just above the C33 DSP. Most of the VAB block diagrams (programs that you will be using) are found in Programs\Hyperception\VABINF\Labs\....... Once you have the ``VAB for INFINITY’’ program running, you will see a Worksheet. It is on this Worksheet that you will build blockdiagrams for various applications. To start your first Lab, go to the toolbar, File-Open Go to ‘’Lab 00 Start Here\Intro to VAB’’ and search for the *.Lst files shown below: We will run all three. Worksheets Mic Speaker.Lst Mic Speaker Cos.Lst Camera Check.Lst Description You get to build this one by simply attaching the microphone to the speaker. You can also build this optional worksheet. You just add a cosine generator to the worksheet above. This worksheet checks the camera to ensure it is working properly. Instructions Enough looking, it is time to play. First check these things: 1. The microphone is connected to the Microphone connector on the DSP board. 2. The Speakers are powered on and are connected to the Speaker connector on the DSP board. 3. The board is connected to the PC USB port. 4. The LED at the top right is lit. 5. Verify that the camera is connected to your PC. The camera driver software should have been installed. Experiments: 1. On your computer, open the file called Mic Speaker.Lst. Your screen should look like Figure 2 above. The Microphone block ( ) on the left gets the signal (or data) from the microphone. The Speaker block ( ) on the right sends data to the speaker. The red wire (*this color implies real time*) connects the two. That is, you are using the DSP board. (White connectors imply that you are running programs on the PC). Note that these blocks represent tested code for the DSP chip, that does not need debugging. So, no programming is necessary. Running the worksheet When you run this worksheet it will take your voice from the microphone and send it to the speaker. Do this: 1. Press the green go button ( begin running on the DSP. ). This is the Run button, it causes the worksheet to 2. Turn on the Speakers. 3. Talk into the microphone. You may need to adjust the volume. If it is too low you will not hear anything. If it is too high, you will hear a high-pitched squeal. Making Observations Now that the DSP is running, make a few observations: 1. Talking into the microphone. Does the sound from the speaker sound like what is going in? 2. Is the output louder or softer than the input? 3. Is the sound quality the same? That is, does it sound muffled, or scratchy, or different from the input? If so, describe the difference. 4. Does the sound quality change if you turn up (or down) the volume on the speakers? So far you have experimented with your own voice. There are many other types of sounds you could try. Try whistling. Be sure to hold the microphone so your whistling is not blowing on it. What does the output sound like? Stopping VAB You will not be able to quit VAB if you have a worksheet running. To stop a worksheet, press the Stop button ( ), which is to the right of the Run button. Other effects Double click on the D/A. Adjust sampling rates. Note that you can sample from 8Khz to 48Khz. (VAB needs to be stopped before you can do that.) Observe quality. Note the range of the D/A. How many bits? Double click on the A/D and observe the sampling rate and precision parameters. Note that the D/A has a framesize parameter. Making the framesize too large, (say 1000) affects the operation in that you cannot hear from the D/A. 2. Now go to ``File – Open’’ and get the Camera Check.Lst worksheet. Note three wires from the Camera. Also that the wires are white (hence PC and not real time). Double click on the camera, click on Capture Pin and observe the parameters. Is there any observable difference with different frame rates? 3. Now we could go to ``File –Open” and get the last experiment Mic Speaker Cos.Lst. Alternatively, we can build this whole thing. Open a new worksheet: To add a block, click on the “Select Blocks” icon ( ). You will see Figure 4 below: 1. In the top drop-down box (labeled "Library:") you will see many libraries to choose from. Select Real-time Library. 2. In the Group List column you will see the dialog box in Figure 4. Select RT Signal Generators. 3. Finally in the right column (Function List) select RT Cosine Generator and click Add to Worksheet (near bottom right). You have just added a block to the worksheet that generates a cosine wave. The new block will appear in the upper left corner. Select one more block and we will be done. 1. Select the Native Library from the Library: drop down menu. 2. Select Arithmetic Operators as shown below. Figure 4: Block Function Selector 3. Select Native Add and press Add to Worksheet. 4. Under Blocks – Infinity Hot List – DSP Blocks, you will find the Speaker and Microphone. Double clicking on them adds them to your worksheet. You now have new blocks. You next task is to wire them in as shown below. Figure 5: Microphone, Speaker and Cosine To connect the blocks: 1. Use the Setup tool ( ) and move the blocks like the figure above. 2. Use the Connect tool ( ) to connect from one block to another. With this tool selected, first click on the Microphone block, then click on the upper half of the Native Add 1 block. Next click on the cosine block, then the lower half of the Native Add 1 block. Finally click on the Native Add 1 block then click on the Speaker block. You are now connected. If you are having trouble getting it connected correctly, you can of course, just open Mic Speaker Cos.Lst Now that everything is connected, it is a good time to save. Go to File/Save As and save your work. There is one last thing to do. The RT Cosine Generator 1 block needs to have some parameters set. 1. Double-click on the RT Cosine Generator 1 block. You should see: Figure 7: Real-time Cosine Generator Parameters 2. Change the Amplitude, Frequency, and Framesize to match the values above. 3. Press the Run button ( ) and listen. You new DSP program is taking the input from the microphone and adding it to a cosine. That new signal is then sent to the speaker. You can double-click on the RT Cosine Generator 1 block and change the frequency and amplitude while the program is running. Try it. Note that the Native Add 1 block only operates on the principle that both inputs to it have framesize 1, that is, the inputs are scalers. That is enough for now. Try figuring out what some of the other blocks can do. You can attach sliders to any block to control the parameters. Try looking under: Figure 8: Block Function Selector and using the Parameter Connect tool ( ) to attach the slider to the block. If you have trouble with this, wait until later. Conclusion Up to this point you have investigated a new system (the DSP board) by passing different signals through it (your voice, your whistle, and the output of some wav files). This is a good start. However, if we are to learn about this system (and more complex and interesting systems), we need better ways to take measurements. In the next Lab we will learn to not only hear the signal, but also see it. LAB REPORT: Give answers to the various questions that have been asked above. Can you also give a few examples where it is preferable to use a DSProcessor over a PC? Copyright © 2002 The INFINITY Project