100% found this document useful (1 vote)
11 views

DSP Lab 09

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
11 views

DSP Lab 09

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

International Islamic University, Islamabad

Digital Signal Processing Lab

EXPERIMENT # 09:
Analog to Digital Conversion of Sound Signal using Speedy 33

Name of Student: …………………………………..

Roll No.: ……………………………………………

Date of Experiment: ………………………………..

Digital Signal Processing Lab Page 1


Analog to Digital Conversion of Sound Signal using Speedy 33

1. Objective
• To understand process of Analog to Digital Conversion
• How to set up ADC in LabVIEW
• To implement ADC on Speedy 33 Kit

2. Resources Required
• Computer System
• LabVIEW Software
• Speedy 33

3. What is Speedy-33?
SPEEDY stands for Signal Processing Educational Engineering Device for Youth.
The SPEEDY-33 is an easy-to-use board that contains TI’s floating-point TMS320VC33 DSP.
The DSP processor optimizes speed by implementing functions in hardware rather than software.
It connects to a standard PC via a Universal Serial Bus (USB) host port. The VC33 DSP Education
Kit from NI includes the SPEEDY-33 and the LabVIEW DSP Embedded software.

Let us take a look at the components of the Speedy-33 board:

Digital Signal Processing Lab Page 2


There are several things on this board that you should observe. They are:

On the lower left end of the picture is the power port. It can supply the NI SPEEDY-33 with
external power when operating the device in standalone mode for live demonstrations and real-
world proof-of-concept applications, without being connected to the PC through USB. When
power is supplied to the device, the power LED lights. The input voltage must be 9 Volt DC
(VDC), at 500 milliamps, with the outside contact being ground and inner contact being positive
VDC.

Right above it is the connector that attaches to a USB port of your PC. LabVIEW programs
and runs the DSP through this connection.

The two small rectangular devices at the top left and top right are onboard microphones.

The biggest thing on the board is the processor or DSP. Texas Instruments (TI) makes this
particular DSP. TI makes many different DSPs; the ‘TMS320VC33’ tells which chip this one is.
This 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 1 GHz to 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).

Right next to the DSP is the flash memory. Once the flash is programmed, the board can be
``unplugged’’ from the PC, powered (9V DC), and run by itself in a standalone mode for live
demonstrations and real-world proof-of-concept applications.

One of the chips is the Audio Interface Controller. 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 (A/D or ADC) and a digital-to-analog converter (D/A or DAC). The 16-bit
stereo audio CODEC included on the NI SPEEDY33 allows for up to 48 kHz dual-channel
sampling on the input signal. Software components are included in the LabVIEW DSP Module to
allow 8 kHz, 18 kHz, 24 kHz, 36 kHz, and 48 kHz sample rates to be used in applications.

The audio input level jumpers (J1, J2) control the amount of gain applied to the input audio signals.
It is used to choose between Line Input (11) and On-Board Microphones (3).

When power is supplied to the device, the power LED lights.


The reset button is a small push button that manually resets the DSP and is usually used
in the event of a software or hardware freeze.

Digital Signal Processing Lab Page 3


&
The two connectors on the right end are Audio Stereo Input Port & Audio Stereo
Output Port. They are used for attaching audio equipment. The upper one goes to the microphone.
The lower one goes to the speakers.
&
There are eight lines of digital Input-Output (I/O) on the board: Input Ports are
represented by 8 switches (lower right) and Output Ports are represented by 8 LEDs (right bottom).
The digital I/O lines can be programmed with the LabVIEW DSP Module.

The Flash Boot Jumper controls whether the DSP will attempt to boot from the flash
memory, which is the default setting. It must be enabled to run the device in standalone mode.

The simple 20-pin expansion header allows for easy interface to external hardware. The
header includes power, ground, eight digital inputs, and eight digital outputs under DSP control.

Two connectors make up the standard expansion analog I/O connectors that can be used for
optional daughter modules.

The flash write enable jumper controls whether the DSP can write to the flash memory or
not. This is useful in write protecting the DSP algorithm for production purposes.

Experiment

Now that you have an idea about the Speedy-33 board, you are ready to begin the experiment.

Hardware and Software Setup:

For all the experiments using the SPEEDY-33 board, you will have to do the following
instructions at the beginning of each experiment.

1. Log on to the computer


2. Connect a USB cable between the USB Port of the SPEEDY-33 and the USB port of your
PC. The SPEEDY-33 is powered by the USB port. Make sure that the Power LED on the
SPEEDY-33 is on.
3. Connect the speakers to the Audio Stereo Output Port on the SPEEDY-33.
4. The on-board microphones will be used as the input to the DSP board.

The next step is to choose a target for the DSP program to be downloaded to. Using the LabVIEW
DSP module, it is very simple to do so as illustrated in Fig. 3. By clicking on the Execution Target
pull-down menu, one can see that the LabVIEW DSP module supports only three DSP targets: NI

Digital Signal Processing Lab Page 4


Speedy-33, TI C6711 and TI C6713. No other DSP hardware can be connected to the LabVIEW
DSP module. In our case, you will have to select Speedy-33 as the target.

Figure 2: Selecting the execution target.

To create a new VI, click New and then select Blank VI.

Figure 3: Generating a new blank VI.

Digital Signal Processing Lab Page 5


As a result, two blank windows will appear which form the basic elements of a LabVIEW
application also called Virtual Instrument (VI).

Figure 5: Front Panel (Dark window) and Block Diagram (White window) in LabVIEW.

The gray color window is called the Front Panel. It is the place where the Graphical User Interface
(GUI) is built. The white color window is called the Block Diagram. It is where the functionality
of the program is defined.
You can toggle between the two windows by pressing Ctrl+E.
The LabVIEW DSP module also shows the target that has been selected in the left bottom of the
window.

The steps in the Hardware & Software setup will always be done at the beginning of each
experiment involving the SPEEDY-33. The experiments’ instructions will differ in the next
sections.

A/D and D/A Conversion

In this section, you will develop a simple VI. As a starting point, you will read an analog input
from the A/D channel and play it back using the D/A channel.

To insert objects in the Block Diagram window, right-click anywhere on the white color window.
By doing that, the Functions Palette will appear as shown in Fig. 6. It contains all functions (VIs)
that you may need to insert in the Block Diagram to develop an application. You can also click on
the thumbtack (upper left corner) to tack down the palette.

In order to acquire an analog input from the A/D channel, you should click on the

Digital Signal Processing Lab Page 6


Elemental I/O sub-palette and bring out the Analog Input Elemental I/O node and place
it on the block diagram.

Figure 6: Using Function Palette to insert objects in the Block Diagram Window
By double-clicking on the Analog Input node, the configure Elemental I/O panel opens up which
allows you to configure the analog input.
By clicking on the configuration tab, you can select from a variety of sampling rates (8000->48000
Hz). Choose a sampling rate of 48 kHz and a framesize of 256 as shown in Fig. 7.

Figure 7: Configuring A/D Input node

Digital Signal Processing Lab Page 7


Click on the OK button to close the configuration panel for Analog Input and return to the block
diagram. The Analog Input block is equivalent to an A/D converter. The Analog Output block is
equivalent to the D/A converter.
Similarly, repeat the same steps to place and configure an Analog Output Elemental I/O node on
the block diagram.
Finally, connect the output terminal of Analog Input to the input terminal of the Analog Output.
In order to do so, move the mouse over the Left (Right) channel output of the Analog Input block,
the mouse curser will change to a wire spindle. Left click and drag the wire to the Left(Right)
channel input of the Analog Output block as illustrated in Fig. 8.

Figure 8: Connecting Analog Input to Analog Output.

Since the program should keep reading input data continuously without stopping, a While Loop

should be added to the VI by going to the Structures sub-palette and selecting While Loop

as shown in Fig. 9.

Digital Signal Processing Lab Page 8


Figure 9: Selecting the structures sub-palette in Block Diagram window.

Place the While Loop around the two blocks by left clicking on the top left corner and dragging
it to the bottom right. A Stop button should appear wired to the conditional terminal of the loop.
It will also appear on the front panel. This button is used to abort execution of the VI while it is
running. The final VI should look similar to the one shown in Fig. 10.

Figure 10: VI with While Loop in Block Diagram window.

Digital Signal Processing Lab Page 9


To run the VI, click on the run button in the upper left corner of the Block Diagram window.

The LabVIEW DSP Module Status Monitor window opens as shown in Fig. 11. It should show
that the program is compiled with 0 errors and that it is downloading to the target.

Figure 11: LabVIEW DSP status monitor window.

Try speaking through the onboard microphones while listening through the
headphones. Can you pick up the sound?

Try to get further form the board. Can you still pick up the sound?

Digital Signal Processing Lab Page 10


Stop running the program by clicking the stop button in the Front Panel window as shown in
Figure 12.

Figure 12: Front Panel window with stop button.

To make the microphone more sensitive, you can add a gain to the Analog Input before feeding it
to the Analog Output.

Try this by modifying the VI to amplify the input signal by 4. Is the sound clearer?

HHHiiinnnttt:::UUUssseeeaaafffuuunnnccctttiiiooonnniiinnnttthhheeeNNNuuummmeeerrriiiccc

SSSuuubbb---pppaaallleeetttttteee

Digital Signal Processing Lab Page 11


Displaying Signal in Time Domain:
In order to be able to see the shape of the input signal in time, one will have to use waveform
graphs.

To set up a basic time-domain display using a Waveform Chart, go to the Front Panel and right-

click on it to bring up the Controls palette. From the Graph sub-palette , choose
Waveform Graph .

Figure 13: Controls Palette and Graph Subpalette in Front Panel window.

Digital Signal Processing Lab Page 12


Place the Waveform Graph on the Front Panel. Double-click on it and change the label to Left
Input Signal. Repeat the same for the Right Input Signal as shown in Fig. 14.

Figure 14: Waveform Graph for the left and right input signals.

If you go to the Block Diagram window, you should notice that there should be two icons
corresponding to the Waveform Graphs inserted in the Front Panel window. Wire the right Output
of the Analog Input to Right Input Signal graph and the left one to the other.
Run the VI. Run the program and speak into the microphones. You should be able to see your
voice changing with time in the waveform graphs.
Try to whistle into the onboard microphone. What do you notice in the graph?
Comment.

Digital Signal Processing Lab Page 13

You might also like