summaryrefslogtreecommitdiff
path: root/1514/CH2/EX2.9/ch2_2_9.sce
blob: be8ed902ac788433c2c11d8848c92ffec089441e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
//chapter 2
//example 2.9
//page 54
clear all;
clc ;
//given
E=5;//i/p voltage in volts
Io=2;//o/p current in mA
Eo=4.5;//o/p voltage in volts
VF=0.7;//forward voltage drop across diode

//finding value of R1
R1=(E-Eo)/Io*10^3;

Er=E;//diode reverse voltage

// forward current
If=(E-VF)/R1*10^3;

printf('\nR1=%dohm\ndiode reverse voltage=%dv\nforward current=%.1fmA',R1,Er,If)