Lab 4& 5
Lab 4& 5
switches.
Objective:-
To get familiar with DSP kit: Speedy 33.
Control LEDs by 8bit DIP switches
Software required:-
o Computer work station
o Matlab 2015 or above
THEORY:
Introduction:
The SPEEDY-33 is an educational Digital Signal Processing development board that can
be easily programmed using the LabVIEW DSP Module. SPEEDY stands for Signal
Processing Educational Engineering Device for Youth. The number 33 comes from the
DSP chip the TMS320VC33 made by Texas Instruments. The TMS320VC33 operates at
150 MHz. For more information please refer to National Instruments Acquires Digital
Signal Processing Software Developer Hyperception.
Though the primary focus of DSP applications is streams of data such as audio
and speech signals, there are applications that benefit from digital inputs and
outputs. Concepts such as triggering and interrupts can be illustrated with the
use of digital inputs, while the LEDs can be used to build many things ranging
from a simple error indicator to an LED VU Meter.
As seen in Fig. 1, the NI SPEEDY-33 comes well equipped with digital I/O. It
has eight onboard LEDs for digital output and eight DIP (Dual In-line Package)
switches for digital input. The digital input and output lines of the NI SPEEDY-
33 can be individually configured from the LabVIEW DSP Module. The LEDs
outputs are enabled by writing a 1 to the appropriate bit of the LED port. The
switch inputs are accessed by the DSP
through reading the appropriate bit of the switch input port. In addition, the LED
output state and the switch inputs are connected in parallel to pins on the simple
expansion digital I/O connector, which could be useful for robotic applications.
Now that you have an idea about the digital input/output ports of the Speedy-33
board,you are ready to begin the experiment and implement some fun
applications using LEDs and switches.
Procedure:
As a starting application, you will implement a VI to check the status of the DIP
switches and accordingly manipulate the corresponding LEDs; i.e., if DIP switch
1 is ON, turn LED1 ON, and so on.
This is done by choosing from the Functions palette the Digital Input node
found in Elemental I/O, as shown in Fig. 2.
By placing the Digital Input node in the window, you can read the status of a
selected DIP switch.
This can be done by first configuring the Digital Input node to the
corresponding DIP switch. By double-clicking on the Digital Input node, the
Configure Elemental I/O panel opens up, which allows you to configure the
digital input. In the General tab, select On-board DIP switch as a resource.
In the Configuration tab, select the DIP switch that you want to read its status.
Choose Switch#1.
Once the Configuration step is completed, connect the output of the Digital Input
node to an indicator, by right-clicking on the output of the Digital Input node and
choosing Create>>Indicator as shown in Fig. 5.
The Front Panel and Block Diagram windows should show a Boolean indicator as
shown in Fig. 6 and Fig. 7.
Place a While Loop so that the VI keeps running when you press the Run
button.You can configure the LEDs in a similar way:
This is done by choosing from the Functions palette the Digital Output node
found in Elemental I/O, as shown in Fig. 8.
Try pressing different DIP switches, while watching the indicator in the
Front Panel. What happens? Comment.
By placing the Digital Output node in the window, you can control the status of
any LED. This can be done by first configuring the Digital Output node to the
corresponding LED.
In the General tab, select On-board LED as a resource .In the Configuration
tab, select the LED that you want to read its status. Choose LED#1.Once the
Configuration step is completed, connect the input of the Digital Output node to
a control, by right-clicking on the input of the Digital Output node and
choosing Create>>Control, as shown in Fig. 11.
The Front Panel and Block Diagram windows should show a Boolean control as
shown in
Remove the Control from the Digital Output input and connect it to the output of
the Digital Input as shown in Fig. 14.
Fig 14: Digital Input connected to Digital Output.
Try pressing the LED control in the Front Panel, while watching the LEDs
on the board. What happens? Comment.
Try pressing the DIP switches on the board, while watching the LEDs on
the board. What happens? Comment.
Modify the VI so that you check the status of the 8 DIP switches and accordingly
manipulate the 8 corresponding LEDs. Your final VI should be similar to the
figure shown in Fig. 15 .
Fig 15: 8 LEDs controlled by 8 DIP switches.
Run the VI and press different switches and notice the corresponding LED that
turns on. Comment.
LabTask
None
Lab Assignment
Make a neat Lab report.
Conclusion
8 DIP switches are used to control LED via speedy-33.
LAB 5: Perform Audio LED VU meter (kit) using DSP kit (speedy-33).
Objective:-
For audio systems or recorders, an audio VU (VU stands for Volume Units) meter is a device
that indicates the relative levels of the audio being recorded or played.
In order to implement an Audio LED VU meter using the Speedy-33 board, you should
acquire an audio signal and compare its energy level with different levels. If the energy is
higher than a certain level, a corresponding LED will be turned on.
Software required:-
o Computer work station
o Matlab 2015 or above
THEORY:
The first step to do is to acquire the audio signal by placing an Analog Input node in the
Block Diagram window, with a sampling rate of 8 kHz.
In order to get the energy level of the signal, look for the RMS block , which you can find in
the Signal Processing->Time Domain sub-palette as shown in Fig. 16.
Next, you should compare the value of the energy level with different constants. If the energy
level is higher than a constant, then the corresponding LED should be turned on.
In order to do so, find the Greater block found in the Comparison sub-palette
as shown in Fig. 18.
The ast step is to compare the signal energy level of the incoming audio signal with a certain
level, and turn on a LED depending on the comparison result. In order to do so, connect 8
Digital Output nodes, corresponding to 8 different LEDS, to the output of the Greater
blocks. Place a While Loop.
Run the VI and comment on the status of the LEDs when you speak.
Try to vary the sensitivity of the VU meter by placing a Multiplier function and
connecting its 2 inputs to the RMS node output and to a control. The output of the
multiplier will be connected to the input of the Greater functions.
LabTask
None
Lab Assignment
Make a neat Lab report
Conclusion
Audio VU meter have been verified using speedy-33.