BT21ECE102 Labsession1

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

SET NO : 02

DEVICE MODELLING LAB


NAME: ABHISHEK DESHMUKH
ENROLLMENT NO: BT21ECE102
DATE OF SUBMISSION : 14/02/24
QUESTION 1:

Simulate the following expression using ng-SPICE in DTL logic


F = Nand of A , B and C

CODE :
vin1 1 0 PULSE(0 1 2n 2n 2n 5m 10m 10)
vin2 2 0 PULSE(0 1 2n 2n 2n 10m 20m 10)
vin3 3 0 PULSE( 2n 2n 2n 15m 30m 10)
r1 4 6 4.7k
r2 6 7 1k
D1 4 1 DIODE
D2 4 2 DIODE
D3 4 3 DIODE
D4 4 5 DIODE
.model DIODE D
v1 6 0 5
q1 7 5 0 trans1
.model trans1 npn
.tran 01.m 50m
.control
run
plot v(1)+20 v(2)+15 v(3)+10 v(7)
set color0 = white
set color1 = black
set xbrushwidth=4
.endc
.end
OUTPUT :

QUESTION 2:

Simulate the Common-Base Amplifier with Gain = 20.

CODE :
vin 1 0 sin(0 0.001 50)
r1 2 0 1k
r2 3 0 2k
r3 3 6 12k
r4 6 4 2.2k
r5 5 0 1k
c1 1 2 102u
c2 3 0 1020m
c3 4 5 1020u
v1 6 0 20
q1 4 3 2 trans1
.model trans1 npn
.measure tran ypp PP v(5) from=10m to=40m
.measure tran ypp PP v(1) from=10m to=40m
.tran 0.1m 50m
.control
run
plot v(1) v(5)
set color0 = white
set color1 = black
set xbrushwidth=4
.endc
.end

OUTPUT :

𝑉𝑜𝑢𝑡 3.996
Gain = 𝑉𝑖𝑛
= 0.1999 = 19.99 ≅ 20

You might also like