blob: 032ea7c2a94f41bffb970a8237cd1c85b2fda0d0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
clear//
//Variables
VCC = 20.0 //Source voltage (in volts)
RC = 5.0 //Collector resistance (in kilo-ohm)
RE = 1.0 //Emitter resistance (in kilo-ohm)
RB = 100.0 //Base resistance (in kilo-ohm)
beta = 150.0 //Common emitter current gain
//Calculation
IC = VCC / (RE + RB/beta) //Collector current (in milli-Ampere)
IE = IC //Emitter current (in milli-Ampere)
r1e = 25.0 / IE * 10**-3 //a.c. resistance of emitter diode (in kilo-ohm)
Ri = beta * (r1e + RE) //Input resistance looking directly into the base (in kilo-ohm)
Ris = RB * Ri / (RB + Ri) //Input resistance of the stage (in kilo-ohm)
Av = RC / RE //Voltage gain
Gp = 10 * log10(Av) //dB power gain (in decibel)
//Result
printf("\n Input resistance looking into the base is %0.0f kilo-ohm.\nInput resistance of the stage is %0.0f kilo-ohm.\nVoltage gain is %0.3f .\ndB voltage gain is %0.0f dB.",Ri,Ris,Av,Gp)
|