Esd Lab Manual
Esd Lab Manual
ELECTRONICS, SECUNDERABAD
(AN ISO 9001:2018 Certified Institution)
Name: ____________________________________
PIN: _____________________________________
Batch: ____________________________________
pg. 1
GOVERNMENT INSTITUTE OF
ELECTRONICS, SECUNDERABAD
(AN ISO 9001:2018 Certified Institution)
CERTIFICATE
pg. 2
INDEX
IN SIGN
S.NO EXPERIMENT NAME SYLLABUS
1 Understanding LABVIEW and familiarization of 1
LABVIEW using SIDE51 & LABVIEW.
2 Design circuit to perform all arithmetic operations 2
using SIDE51 & LABVIEW
3 Design circuit to perform logical operations using 3
SIDE51 & LABVIEW.
4 Write an 8051c program to send the value 00 to FFH 6
to port 1 using SIDE51 & LABVIEW.
5 Write a program to send the value of-4 to +4 to port 7
1 using SIDE51 & LABVIEW.
6 Write a 8051c program to get a byte of data from PO. 9
If it is less than 100 send it to P1 otherwise send it to
P2 using SIDE51 & LABVIEW.
7 LED’s are connected to bits of P1 and P2. Write an 10
8051C program that shows the count from 0 to FFH
on the LED’s using SIDE51 & LABVIEW.
8 Write a program to toggle bits of P1 continuously 11
with some delay using SIDE51 & LABVIEW.
9 Experiments of Arithmetical functions using MATLAB 12
& Lab VIEW (Add, Subtract, Multiply, Divide)
10 Experiments on Boolean functions using MATLAB & 13
Lab VIEW (AND, OR, NOT, NAND, NOR).
11 Design and Development of Half Adder and Full 14
Adder using MATLAB & Lab VIEW.
12 Design and Development of Various signals 15
Generation using MATLAB & Lab VIEW.
13 Design and Development of Filters using MATLAB & 16
Lab VIEW(LPF, HPF, BPF).
14 Design and Development of SUBVI . 17
pg. 3
EXPERIMENT-1 : Understanding LABVIEW and familiarization of LABVIEW using
SIDE51 & LABVIEW.
IT APPEARS AS 2 WINDOWS:
FRONT PANNEL: ONLY SPECIFIES INPUTS AND OUTPUTS I.E., USER SPECIFIES THE INPUTS IN THIS
PANNEL AND OUTPUTS ARE COLLECTED.
IN THIS PANNEL IF WE GIVE RIGHT CLICK, CONTROL PANNEL IS DISPLAYED, WE SELECT INPUT
SPECIFIERS AND OUTPUT SPECIFIERS FROM THIS PANNEL.
BLOCK DIAGRAM: WINDOW SPECIFIES THE OPERATIONS TO BE PERFORMED I.E., USER DESIGNS
ACTUAL CIRCUIT
pg. 4
pg. 5
EXPERIMENT-2: Design circuit to perform all arithmetic operations using SIDE51 &
LABVIEW
PROCEDURE:
FRONT-PANNEL OPERATION:
GIVE A RIGHT CLICK ON FRONT PANEL, A FUNTION TOOLBAR WILL BE APPEARED SELECT
MODEM > NUMERIC CONTROL, MOVE REQUIRED NUMERIC CONTROL TO THE FRONT PANEL
MODEM > NUMERIC INDICATOR, MOVE REQUIRED NUMERIC INDICATOR TO THE FRONT
PANEL
ASSIGN REQUIRED NAMES TO NUMERIC CONTROLS & NUMERIC INDICATORS TAKEN
SPECIFY VALUES IN NUMERIC CONTROL FOR THE SAKE OF PERFORMING ARTHEMATIC
OPERATIONS
BLOCK-PANNEL OPERATION:
pg. 6
RESULT: THE REQUIRED RESULTS FOR PERFORMED ARTHIMATIC OPERATIONS ARE DISPLAYED IN
FRONT PANNEL NUMERIC INDICATOR.
pg. 7
EXPERIMENT-3: Design circuit to perform logical operations using SIDE51 &
LABVIEW
PROCEDURE:
OPEN LABVIEW SOFTWARE AND CREATE NEW VI FOLDER.
TWO WINDOWS ARE DISPLAYED, ADJUST THEM SIDE BY SIDE USING WINDOW BUTTON
SPECIFIED ON TOOLBAR.
NOW FRONT PANEL AND BLOCK DIAGRAM WINDOWS ARE ADJUSTED SIDE BY SIDE.
FRONT-PANNEL OPERATION:
GIVE A RIGHT CLICK ON FRONT PANEL, A FUNTION TOOLBAR WILL BE APPEARED SELECT
MODEM > NUMERIC CONTROL, MOVE REQUIRED NUMERIC CONTROL TO THE FRONT PANEL
MODEM > NUMERIC INDICATOR, MOVE REQUIRED NUMERIC INDICATOR TO THE FRONT
PANEL
ASSIGN REQUIRED NAMES TO NUMERIC CONTROLS & NUMERIC INDICATORS TAKEN
SPECIFY VALUES IN NUMERIC CONTROL FOR THE SAKE OF PERFORMING ARTHEMATIC
OPERATIONS
BLOCK-PANNEL OPERATION:
pg. 8
RESULT: THE REQUIRED RESULTS FOR PERFORMED LOGICAL OPERATIONS ARE DISPLAYED IN
FRONT PANNEL NUMERIC INDICATOR.
pg. 9
EXPERIMENT-4: Write an 8051c program to send the value 00 to FFH to port 1
using SIDE51 & LABVIEW.
AIM: TO SEND THE VALUE 00 TO FFH TO PORT 1 USING LABVIEW SOFTWARE.(8051 C PROGRAM)
PROGRAM:
#include<reg51.h>
void main(void)
{
Unsigned char z;
for(z=o;z<=255;z++);
{
P1=z;
}
}
Output:
P1=0000 0001
P1=0000 0010
P1=0000 0011
.
.
.
P1=1111 1111
P0=0000 0000
pg. 10
EXPERIMENT-5: Write a program to send the value of-4 to +4 to port 1 using
SIDE51 & LABVIEW.
AIM: TO SEND THE VALUE OF -4 TO +4 TO PORT 1 USING LABVIEW SOFTWARE.(8051 C PROGRAM)
PROGRAM:
#include<reg51.h>
void main(void)
{
char mynum[]={+1,-1,+2,-2,+3,-3,+4,-4};
unsigned char z;
for(z=0;z<=8;z++);
{
P1=mynum[z];
}
}
Output:
P1=0*01
P1=02
P1=0*03
P1=0*04
P1=0*FF
P1=0*FE
P1=0*FD
P1=0*FC
pg. 11
EXPERIMENT-6: Write a 8051c program to get a byte of data from PO. If it is less
than 100 send it to P1 otherwise send it to P2 using SIDE51 & LABVIEW.
AIM: To get a byte of data from PO. If it is less than 100 send it to P1
otherwise send it to P2 .
Required software:
● Keil uVsion5
Procedure:
1) Open keil uVsion5
2) Create new uVision project and save it in any file location with any name.
3) Select AT89C51 (8051 microcontroller) and click ok
4) Take new file and write code .
5) Save file with extension “.c”.
6) Click on build target to check if errors present in your code.
7) Right click on source group and select “Add Existing Files to group ‘Fource
Group’”
8) Select c file in which the code is written.
9) click “Start debug session”
10) Click ports and oprn ports required.
11) View result by clicking “f11”, it executes code line by line .
Code:
#include<reg51.h>
void main ()
{
unsigned char i;
P1=0x55;
while (1)
{
i=P0;
if(i<100)
pg. 12
{
P1=P0;
}
else
{
P2=P0;
}
}
}
Output:
pg. 13
EXPERIMENT-7: LED’s are connected to bits of P1 and P2. Write an 8051C
program that shows the count from 0 to FFH on the LED’s using SIDE51 &
LABVIEW.
AIM: To show the count from 0 to FFH on the LED’s,while LED’s are connected
to bits of P1 and P2
Required software:
● Keil uVsion5
Procedure:
1. Open keil uVsion5
2. Create new uVision project and save it in any file location with any name.
3. Select AT89C51 (8051 microcontroller) and click ok
4. Take new file and write code .
5. Save file with extension “.c”.
6. Click on build target to check if errors present in your code.
7. Right click on source group and select “Add Existing Files to group ‘Fource
Group’”
8. Select c file in which the code is written.
9. click “Start debug session”
10.Click ports and oprn ports required.
11.View result by clicking “f11”, it executes code line by line .
Code:
#include<reg51.h>
#define LED P2
void main ()
{
P1=0x00;
LED=0x00;
while (1)
{
pg. 14
P1++;
LED++;
}
}
Output:
pg. 15
EXPERIMENT-8: Write a program to toggle bits of P1 continuously with some
delay using SIDE51 & LABVIEW.
Procedure:
1. Open keil uVsion5
2. Create new uVision project and save it in any file location with any name.
3. Select AT89C51 (8051 microcontroller) and click ok
4. Take new file and write code .
5. Save file with extension “.c”.
6. Click on build target to check if errors present in your code.
7. Right click on source group and select “Add Existing Files to group ‘Fource
Group’”
8. Select c file in which the code is written.
9. click “Start debug session”
10.Click ports and oprn ports required.
11.View result by clicking “f11”, it executes code line by line .
Code:
#include<reg51.h>
void main (void)
{
unsigned int x;
while (1)
{
for (x=0; x<10; x++)
{
pg. 16
P1=0x55;
}
for(x=0; x<400; x++)
{
P1=0x48;
}
}
}
Output:
pg. 17
EXPERIMENT-9: Experiments of Arithmetical functions using MATLAB & LabVIEW (Add,
Subtract, Multiply, Divide).
Aim: Performing Arithmetical operations by arithmetical functions functions using
MATLAB
Required software:
● Any browser
● Mathworks account
Procedure:
● Open matlab
● Create new script
● Write code in the created file
● Change settings as per your requirements.
● Click Run to run the code
● View output in the command window.
MATLAB CODE :
1. a = 10;
2. b = 20;
3. c = a + b
4. d = a - b
5. e = a * b
6. f = a / b
7. g = a \ b
8. x = 7;
9. y = 3;
10.z = x ^ y
OUTPUT:
c =30
d =-10
e =200
f =0.5000
g=2
z = 343
pg. 18
EXPERIMENT-10: Experiments on Boolean functions using MATLAB & LabVIEW (AND,
OR, NOT, NAND, NOR).
Aim : Performing logical operations (AND, OR, NOT, NAND, NOR) by boolean
functions functions using MATLAB
Required software:
● Any browser
● Mathworks account
Procedure:
1. Open matlab ➡ Click simulink .
2. On simulink start page , click Blank model ➡ create a model.
3. Click library browser , to open library browser to search components.
4. Double click on simulink
5. Select required group of blocks
6. right click on required component & click “Add block to model”.
7. Double click the block to open its properties & change if needed .
8. Add all (input&outbut, components)the required blocks.
9. Design the circuit as per circuit required.
10. Give required inputs & Click run to view the output.
pg. 19
Simulink designs :
pg. 20
EXPERIMENT-11: Design and Development of Half Adder and Full Adder using
MATLAB & LabVIEW.
Simulink design :
pg. 21
Circuit & truth table :
Simulink design :
Procedure:
11. Open matlab ➡ Click simulink .
12. On simulink start page , click Blank model ➡ create a model.
13. Click library browser , to open library browser to search components.
14. Double click on simulink
15. Select required group of blocks
16. right click on required component & click “Add block to model”.
17. Double click the block to open its properties & change if needed .
18. Add all (input&outbut, components)the required blocks.
19. Design the circuit as per circuit required.
20. Give required inputs & Click run to view the output.
pg. 22
EXPERIMENT-12: Design and Development of Various signals
Generation using MATLAB & LabVIEW.
Required software:
● Any browser
● Mathworks account
Procedure:
pg. 23
● Open browser and login into mathworks account
● Open matlab .
● Create a new file to write code for signal generation.
● Enter the required code .
● Execute the code to see the signal.
● You can see the generated signal in a new bar .
pg. 24
EXPERIMENT-13: Design and Development of Filters using MATLAB &
LabVIEW(LPF, HPF, BPF).
Required software:
● Any browser
● Mathworks account
Procedure:
Inputs :
● wc=pi/2
● m=7
Program Code :
function[]=lpfshyam(wc,N)
i=(N-1)/2;
wn=wc/pi;
syms w
for n=-i:i
y(n+i+1)=(int(exp(w*n*j),-wc,wc))*1/(2*pi);
pg. 25
end
y=sym2poly(y)
for n=0:N-1
w(n+1)=0.54-0.46*cos(2*pi*n/(N-1));
h(n+1)=y(n+1).*w(n+1);
end
h=sym2poly(h)
fir1(N-1,wn)
end
Inputs:
● Wc=pi/2
● m=7
pg. 26
Program Codes:
function[]=hpfshyam(wc,N)
i=(N-1)/2; wn=wc/pi;
syms w
for n=-i:i
y(n+i+1)=(1/2*pi)*(int(exp(j*w*n),-pi,-wc)+int(exp(j*w*n),wc,pi));
end
y=sym2poly(y)
for n=0:N-1
w(n+1)=0.54-0.46*cos(2*pi*n/(N-1));
h(n+1)=y(n+1).*w(n+1);
end
h=sym2poly(h)
fir1(N-1,wn)
end
pg. 27
Band pass filter
Inputs:
● Wc1=pi/4
● wc2=pi/6
● m=7
Program Codes:
function[]=bpfshyam(wc1,wc2,N)
i=(N-1)/2;
wn1=wc1/pi;
wn2=wc2/pi;
syms w
end
y=sym2poly(y)
for n=0:N-1
w(n+1)=0.54-0.46*cos(2*pi*n/(N-1));
h(n+1)=y(n+1).*w(n+1);
end
h=sym2poly(h)
fir1(N-1,wn1)
pg. 28
end
pg. 29
EXPERIMENT-14: Design and Development of SUBVI .
AIM: Design and Development of SUBVI USING LAB VIEW
REQUIRED MATERIALS: 1) COMPUTER
2) LAB VIEW
THEORY:
The power of NI LabVIEW software lies in the modular nature of the VI.
After you create a VI, you can use it on the Block Diagram of another
LabVIEW program – this VI can now be referenced as a subVI. Using modular
programming helps you reduce duplication of efforts through code reuse,
streamline and visually clean up code, manage changes to code, and debug
the Block Diagram quickly.
SubVIs contains front panels and block diagrams which you specify when
creating the subVI. Unlike built-in LabVIEW function, when creating these VIs
yourself, you must configure the a connector pane to set your VI’s inputs
and outputs. You can also edit the icon of the subVI that is seen when it is on
the block diagram to be an intuitive representation of what your function
does.
PROCEDURE:
You can simplify the block diagram of a VI by converting sections of the block diagram
into subVIs. There are two ways to make a subVI in LabVIEW:
Creating a standalone VI and then use it (drag and drop it) in a higher-level VI
as a subVI
If you have already created the code that you would like to use in other
VIs as its own standalone VI, continue on to the Edit the SubVI
Icon section
Create a subVI from a section of code within another VI.
1. Launch LabVIEW and open the VI from which you want to create a
subVI
pg. 30
3. From the Edit menu, select Create SubVI to create a subVI from your selection.
The selected section of the block diagram is replaced with a default icon
for the subVI. LabVIEW creates controls and indicators for the new subVI,
automatically configures the connector pane based on the number of
control and indicator terminals you selected, and wires the subVI to the
existing wires.
4. SUBVI is created .
RESULT: Designed and developed subVI.
pg. 31
pg. 32