DSP Lab 09
DSP Lab 09
EXPERIMENT # 09:
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.
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).
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.
For all the experiments using the SPEEDY-33 board, you will have to do the following
instructions at the beginning of each experiment.
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
To create a new VI, click New and then select Blank 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.
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
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.
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.
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.
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.
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?
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
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.
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.