diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /1757/CH11/EX11.9 | |
download | Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2 Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip |
initial commit / add all books
Diffstat (limited to '1757/CH11/EX11.9')
-rwxr-xr-x | 1757/CH11/EX11.9/EX11_9.sce | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/1757/CH11/EX11.9/EX11_9.sce b/1757/CH11/EX11.9/EX11_9.sce new file mode 100755 index 000000000..413c78421 --- /dev/null +++ b/1757/CH11/EX11.9/EX11_9.sce @@ -0,0 +1,70 @@ +//Example11.9 // determine the analog output voltage and feed back current If
+clc;
+clear;
+close;
+Vref = 10 ;
+BI = 1001 ; BI = 1100 ; BI = 1010 ; BI = 0011 ;
+Rf = 50 ; // K ohm
+R = 0.4*Rf ;
+
+// The output voltage of given R-2R ladder D/A converter is defined as
+
+// Vo = -(Rf*Vref/2R)*(2^0*b0+2^-1*b1+2^-2*b2+2^-3*b3) ;
+
+// Vo = -(Rf*Vref/2R)*(b0+2^-1*b1+2^-2*b2+2^-3*b3) ;
+
+// for the given value Rf,R and Vref the output voltage
+
+// Vo = -12.5*(b0+2^-1*b1+2^-2*b2+2^-3*b3) ;
+
+// for the binary input 1001 analog output is
+b3 = 1 ;
+b2 = 0 ;
+b1 = 0 ;
+b0 = 1 ;
+Vo = -12.5*(b0+2^-1*b1+2^-2*b2+2^-3*b3) ;
+disp('for the binary input 1001 analog output is = '+string(Vo)+ ' V ');
+
+// the feedback current If is given by
+If = -(Vo/Rf) ;
+disp('the feedback current If is = '+string(If)+ ' mA ');
+
+
+// for the binary input 1100 analog output is
+b3 = 1 ;
+b2 = 1 ;
+b1 = 0 ;
+b0 = 0 ;
+Vo = -12.5*(b0+2^-1*b1+2^-2*b2+2^-3*b3) ;
+disp('for the binary input 1100 analog output is = '+string(Vo)+ ' V ');
+
+// the feedback current If is given by
+If = -(Vo/Rf) ;
+disp('the feedback current If is = '+string(If)+ ' mA ');
+
+
+// for the binary input 1010 analog output is
+b3 = 1 ;
+b2 = 0 ;
+b1 = 1 ;
+b0 = 0 ;
+Vo = -12.5*(b0+2^-1*b1+2^-2*b2+2^-3*b3) ;
+disp('for the binary input 1010 analog output is = '+string(Vo)+ ' V ');
+
+// the feedback current If is given by
+If = -(Vo/Rf) ;
+disp('the feedback current If is = '+string(If)+ ' mA ');
+
+
+// for the binary input 0011 analog output is
+b3 = 0 ;
+b2 = 0 ;
+b1 = 1 ;
+b0 = 1 ;
+Vo = -12.5*(b0+2^-1*b1+2^-2*b2+2^-3*b3) ;
+disp('for the binary input 0011 analog output is = '+string(Vo)+ ' V ');
+
+// the feedback current If is given by
+If = -(Vo/Rf) ;
+disp('the feedback current If is = '+string(If)+ ' mA ');
+
|