summaryrefslogtreecommitdiff
path: root/3754/CH30/EX30.1/30_1.sce
blob: b3fd8996d6701a31a85e895bb6afad06638ac4e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
clear//

//Variables

ID = 5.0 * 10**-3              //Drain current (in Ampere)
VDD = 10.0                     //Voltage (in volts)
RD = 1.0 * 10**3               //Drain resistance (in ohm)
RS = 500.0                     //Source resistance (in ohm)                    

//Calculation

VS = ID * RS                   //Source voltage (in volts)
VD = VDD - ID * RD             //Drain voltage (in volts)
VDS = VD - VS                  //Drain-Source voltage (in volts)
VGS = -VS                      //Gate-to-source voltage (in volts)

//Result

printf("\n Value of drain-to-source voltage is  %0.3f  V.\nValue of Gate-to-source voltage is  %0.3f  V.",VDS,VGS)