diff options
Diffstat (limited to '182/CH5')
-rwxr-xr-x | 182/CH5/EX5.1/example5_1.sce | 15 | ||||
-rwxr-xr-x | 182/CH5/EX5.1/example5_1.txt | 3 | ||||
-rwxr-xr-x | 182/CH5/EX5.2/5_2.txt | 3 | ||||
-rwxr-xr-x | 182/CH5/EX5.2/Example5_2.sce | 21 | ||||
-rwxr-xr-x | 182/CH5/EX5.3/5_3.txt | 4 | ||||
-rwxr-xr-x | 182/CH5/EX5.3/example5_3.sce | 22 | ||||
-rwxr-xr-x | 182/CH5/EX5.4/5_4.txt | 1 | ||||
-rwxr-xr-x | 182/CH5/EX5.4/example5_4.sce | 12 | ||||
-rwxr-xr-x | 182/CH5/EX5.5/5_5.txt | 2 | ||||
-rwxr-xr-x | 182/CH5/EX5.5/example5_5.sce | 15 | ||||
-rwxr-xr-x | 182/CH5/EX5.6/5_6.txt | 1 | ||||
-rwxr-xr-x | 182/CH5/EX5.6/exampke5_6.sce | 17 | ||||
-rwxr-xr-x | 182/CH5/EX5.7/5_7.txt | 2 | ||||
-rwxr-xr-x | 182/CH5/EX5.7/example5_7.sce | 11 |
14 files changed, 129 insertions, 0 deletions
diff --git a/182/CH5/EX5.1/example5_1.sce b/182/CH5/EX5.1/example5_1.sce new file mode 100755 index 000000000..ba9eda331 --- /dev/null +++ b/182/CH5/EX5.1/example5_1.sce @@ -0,0 +1,15 @@ +// to find the high and low output voltage values
+// example 5-1 in page 120
+clc;
+//Given data
+Vcc=5;// DC source in volts
+Io=1e-3;// output current= 1mA
+R1=1e+3;//R1=1K-ohm
+Vi=0;//lowest input voltage
+Vd=0.7;// silicon-diode drop in volts
+//calculation
+printf("High output voltage=%d V\n",Vcc-(Io*R1));
+printf("low output voltage=%.1f V\n",Vi+Vd);
+//result
+//High output voltage=4 V
+//low output voltage=0.7 V
\ No newline at end of file diff --git a/182/CH5/EX5.1/example5_1.txt b/182/CH5/EX5.1/example5_1.txt new file mode 100755 index 000000000..1ce44d1bb --- /dev/null +++ b/182/CH5/EX5.1/example5_1.txt @@ -0,0 +1,3 @@ +
+1.Highest out put voltage=4 V
+lowest output voltage=0.700000 V
\ No newline at end of file diff --git a/182/CH5/EX5.2/5_2.txt b/182/CH5/EX5.2/5_2.txt new file mode 100755 index 000000000..a70319809 --- /dev/null +++ b/182/CH5/EX5.2/5_2.txt @@ -0,0 +1,3 @@ +
+2.Vb1=-1.657143 V
+Vc1=4.395973 V
diff --git a/182/CH5/EX5.2/Example5_2.sce b/182/CH5/EX5.2/Example5_2.sce new file mode 100755 index 000000000..8987b11e1 --- /dev/null +++ b/182/CH5/EX5.2/Example5_2.sce @@ -0,0 +1,21 @@ +// To find the collector and base voltages
+// example 5-2 in page 121
+clc;
+// Given data
+R1=15e+3; R2=27e+3; Rc1=2.7e+3; R11=R1; R21=R2; //resistance values in Ohm where R11=R1' and R21=R2'
+Vc2=0.2;// collector voltage of on transistor in volt
+Vce=Vc2;//collector-emitter saturation voltage in volt
+Vbb=-5;//dc power supply in volt
+Vcc=5;//dc power supply in volt
+//calculations
+Vr1r2=Vc2-Vbb;//voltage across Ri and R2 in volt
+Vr1=(R1/(R1+R2))*Vr1r2;// voltage across R1 resistor in volt
+Vb1=Vc2-Vr1;// base voltage
+printf("Vb1=%.1f V\n",Vb1);
+//with Q1 off
+Vrc1=(Rc1/(Rc1+R11+R21))*(Vcc-Vbb);
+Vc1=Vcc-Vrc1;// collector voltage in volt
+printf("Vc1=%.1f V",Vc1);
+//result
+//Vb1=-1.657143 V
+//Vc1=4.395973 V
\ No newline at end of file diff --git a/182/CH5/EX5.3/5_3.txt b/182/CH5/EX5.3/5_3.txt new file mode 100755 index 000000000..d2e9dede0 --- /dev/null +++ b/182/CH5/EX5.3/5_3.txt @@ -0,0 +1,4 @@ +3case 1,
+Total current=0.460000 A
+case 2,
+Total current=0.006900 A
diff --git a/182/CH5/EX5.3/example5_3.sce b/182/CH5/EX5.3/example5_3.sce new file mode 100755 index 000000000..d998d4f5d --- /dev/null +++ b/182/CH5/EX5.3/example5_3.sce @@ -0,0 +1,22 @@ + +//example 5-3 in page 124 +clc; +// Given data +// 3(1/2) digit display +If1=20e-3;//forward current per segment of led=20 mA +If2=300e-6;//forward current per segment of lcd +//calculations +for n=1:2 + if n==1 + I=If1; + else I=If2; + end + It=3*7*I+2*I;// each digit has 7 segments and there are three digits with a half digit that has 2 segments + printf("case %d,\n Total current=%.0f mA\n",n,It*1000); +end +//result +// case 1, +//Total current=0.460000 A +//case 2, +//Total current=0.006900 A +
\ No newline at end of file diff --git a/182/CH5/EX5.4/5_4.txt b/182/CH5/EX5.4/5_4.txt new file mode 100755 index 000000000..80b791c41 --- /dev/null +++ b/182/CH5/EX5.4/5_4.txt @@ -0,0 +1 @@ +4.output frequency=244 hertz
\ No newline at end of file diff --git a/182/CH5/EX5.4/example5_4.sce b/182/CH5/EX5.4/example5_4.sce new file mode 100755 index 000000000..a2d1fcccd --- /dev/null +++ b/182/CH5/EX5.4/example5_4.sce @@ -0,0 +1,12 @@ +// to find the out put frequency in fig 5-10
+// example 5-4 in page 130
+clc;
+//Given data
+To=1e-6;//oscillator time period=1 micro-second
+N=16;// modulus number of the counter = 16
+n=3;// number of counters
+//calculations
+T=To*(N^n);//out put time period
+printf("output frequency=%d hertz",1/T);//output frequency
+//result
+//output frequency=244 hertz
\ No newline at end of file diff --git a/182/CH5/EX5.5/5_5.txt b/182/CH5/EX5.5/5_5.txt new file mode 100755 index 000000000..4ed1f43de --- /dev/null +++ b/182/CH5/EX5.5/5_5.txt @@ -0,0 +1,2 @@ +5.number of pulses counted for Vi=0.750000 V are 75000
+number of pulses counted for Vi=0.900000 V are 90000
diff --git a/182/CH5/EX5.5/example5_5.sce b/182/CH5/EX5.5/example5_5.sce new file mode 100755 index 000000000..f5403b3ff --- /dev/null +++ b/182/CH5/EX5.5/example5_5.sce @@ -0,0 +1,15 @@ +//To find the number of pulses counted
+//example5-5 in page 131
+clc;
+//data given
+Vr=1.25;//peak voltage of ramp in volts
+tr=125e-3;//time period of the ramp=1.25 ms
+T=1/(1e+6);// frequency =1 Mhz and time period of the clock pulses is 1/f
+for Vi=0.75:(0.9-0.75):0.9,// analog input voltages for which clock pulses has to b found
+ t1=(tr/Vr)*Vi;//time period of the comparator high out put
+ N=t1/T;// pulses counted
+ printf("number of pulses counted for Vi=%.2f V are %d\n",Vi,N/100);
+end
+//result
+//number of pulses counted for Vi=0.750000 V are 750
+//number of pulses counted for Vi=0.900000 V are 900
\ No newline at end of file diff --git a/182/CH5/EX5.6/5_6.txt b/182/CH5/EX5.6/5_6.txt new file mode 100755 index 000000000..abc2f6952 --- /dev/null +++ b/182/CH5/EX5.6/5_6.txt @@ -0,0 +1 @@ +6.for less 1percent error,use n=7
\ No newline at end of file diff --git a/182/CH5/EX5.6/exampke5_6.sce b/182/CH5/EX5.6/exampke5_6.sce new file mode 100755 index 000000000..f0231db72 --- /dev/null +++ b/182/CH5/EX5.6/exampke5_6.sce @@ -0,0 +1,17 @@ + +// example 5-6 in page 133 +clc; +//Given data +//error should be less thsn 1% +// for less than 1% error count>=100 +n=6; +N=0; +while(N<100) +N=(2^n)-1;//count value +if(N<100) +n=n+1;//increment n and check weather N has exceeded 100 +end +end +printf("for less 1percent error,use n=%d\n",n); +//end +// for less 1percent error,use n=7
\ No newline at end of file diff --git a/182/CH5/EX5.7/5_7.txt b/182/CH5/EX5.7/5_7.txt new file mode 100755 index 000000000..21ac8386d --- /dev/null +++ b/182/CH5/EX5.7/5_7.txt @@ -0,0 +1,2 @@ +
+7.out put voltage=6.250000 V
\ No newline at end of file diff --git a/182/CH5/EX5.7/example5_7.sce b/182/CH5/EX5.7/example5_7.sce new file mode 100755 index 000000000..fed413092 --- /dev/null +++ b/182/CH5/EX5.7/example5_7.sce @@ -0,0 +1,11 @@ + +// example 5-7 in page 135 +clc; +//Given data +D=8; C=0; B=2; A=0; //corresponding analog input voltages for the digital input 1-0-1-0 +Vi=10;//input voltage in volts +//calculation +Vo=(D+C+B+A)*Vi/16;// output voltage +printf("out put voltage=%.2f V",Vo); +//result +//out put voltage=6.25 V
\ No newline at end of file |