From b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b Mon Sep 17 00:00:00 2001 From: priyanka Date: Wed, 24 Jun 2015 15:03:17 +0530 Subject: initial commit / add all books --- 3041/CH8/EX8.1/Ex8_1.sce | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 3041/CH8/EX8.1/Ex8_1.sce (limited to '3041/CH8/EX8.1') diff --git a/3041/CH8/EX8.1/Ex8_1.sce b/3041/CH8/EX8.1/Ex8_1.sce new file mode 100755 index 000000000..e61eef580 --- /dev/null +++ b/3041/CH8/EX8.1/Ex8_1.sce @@ -0,0 +1,28 @@ +//Variable declaration +C=0.1 //capacitance(uF) +R1=10 //resistance(k ohms) +R2=2.3 //resistance(k ohms) +Vcc=12. //supply voltage(V) +Rl=10**3. //resistance(k ohms) + +//Calculations +//Part a +f=1/(0.693*C*(R2+R1/2)) //frequency(Hz) + +//Part b +D=(1+(R2/R1))/(1+2*(R2/R1))*100 //duty cycle + +//Part c +//(i) +T1=0.693*C*(R1+R2) //time period through R1(ms) +T2=0.693*R2*C //time period through R2(ms) +Pavg=(Vcc/Rl)**2*(T1/(T1+T2)) //average power dissipated during current sourcing(mW) + +//Part d +Pavg1=(T2/(T1+T2))*(Vcc/Rl)**2 //average power dissipated during current sinking(mW) + +//Results +printf (" %.2f kHz",f) +printf ("duty cycle is %.2f %%",D) +printf ("average power dissipated in current sourcing is %.3f mW",Pavg/1E-3) +printf ("average power dissipated in current sinking is %.3f mW",Pavg1/1e-3) -- cgit