blob: 19c9f712000786ba6ab6dde9ae8b4547238f5cb6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
//chapter9
//example9.20
//page170
R=5 // kilo ohm
Rl=10 // kilo ohm
Ei=120 // V
Vz=50 // V
V=Ei*Rl/(R+Rl) // voltage across open circuit if zener diode is removed
Vo=Vz // output voltage
V_R=Ei-Vz // drop across R
Il=Vz/Rl // load current
I=V_R/R // current through R
// by Kirchoff first law I=Iz+Il
Iz=I-Il
printf("output voltage = %.3f V \n",Vo)
printf("voltage drop across series resistance = %.3f V \n",V_R)
printf("current through Zener diode = %.3f mA \n",Iz)
|