summaryrefslogtreecommitdiff
path: root/2459/CH12/EX12.6/Ex12_6.sce
blob: cacf6eac82e5dd690e264382b28e52f60dd617b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
//chapter12
//example12.6
//page242

Vcc=10 // V
R_B=1d3 // kilo ohm
R_E=1 // kilo ohm
Vbe=0 // since it is negligible
gain_beta=100

// by Kirchoff voltage law to base side we get Vcc=I_B*R_B+Vbe+I_E*R_E
// but I_E=I_B+I_C and I_C=gain_beta*I_B
// so we get Vcc=I_B*R_B+Vbe+R_E*I_B*(1+gain_beta)
// making I_B as subject we get

I_B=(Vcc-Vbe)/(R_B+R_E*(1+gain_beta)) // in ampere
I_C=gain_beta*I_B // in ampere
I_E=I_C+I_B // in ampere

printf("base current = %.4f mA \n",I_B)
printf("collector current = %.4f mA \n",I_C)
printf("emitter current = %.4f mA \n",I_E)