summaryrefslogtreecommitdiff
path: root/3754/CH20/EX20.9/20_9.sce
blob: 59b7f2a240175507c5ca86f51fa5ace9328bef1a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
clear//

//Variables

VZ = 10.0                                   //Zener voltage (in volts)
RS = 1.0                                    //Series Resistance (in kilo-ohm)   
RL = 2.0                                    //Load Resistance (in kilo-ohm)
VSmin = 22.0                                //Minimum source voltage (in volts) 
VSmax = 40                                  //Maximum source voltage (in volts) 

//Calculation

IL = VZ / RL                                //Load current (in milli-Ampere)
IZmax = (VSmax - VZ) / RS - IL              //Maximum value of zener current (in milli-Ampere)
IZmin = (VSmin - VZ) / RS - IL              //Minimum value of zener current (in milli-Ampere)

//Result

printf("\n Maximum value of zener current is  %0.3f  mA.\nMinimum value of zener current is  %0.3f  mA.",IZmax,IZmin)