summaryrefslogtreecommitdiff
path: root/3754/CH22/EX22.18/22_18.sce
diff options
context:
space:
mode:
Diffstat (limited to '3754/CH22/EX22.18/22_18.sce')
-rw-r--r--3754/CH22/EX22.18/22_18.sce23
1 files changed, 23 insertions, 0 deletions
diff --git a/3754/CH22/EX22.18/22_18.sce b/3754/CH22/EX22.18/22_18.sce
new file mode 100644
index 000000000..cb51072f4
--- /dev/null
+++ b/3754/CH22/EX22.18/22_18.sce
@@ -0,0 +1,23 @@
+clear//
+
+//Variables
+
+VCC = 10.0 //Source voltage (in volts)
+RE = 500.0 //Emitter Resistance (in ohm)
+RC = 1.0 //Collector Resistance (in kilo-ohm)
+R1 = 10.0 //Resistance (in kilo-ohm)
+R2 = 5.0 //Resistance (in kilo-ohm)
+VBE = 0.7 //Emitter-to-Base Voltage (in volts)
+beta = 100.0 //Common emitter current gain
+
+//Calculation
+
+VB = VCC * (R2 /(R1 + R2)) //Base voltage (in volts)
+VE = VB - VBE //Emitter voltage (in volts)
+IE = VE / RE //Emitter current (in Ampere)
+IC = IE //Collector current (in Ampere)
+VCE = VCC - IC * (RC * 10**3 + RE) //Collector-to-Emitter voltage (in volts)
+
+//Result
+
+printf("\n Collector current is %0.2f mA.\nCollector-to-Emitter voltage is %0.3f V.",IC*10**3,VCE)