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/CH12/EX12.3 | |
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/CH12/EX12.3')
-rwxr-xr-x | 1757/CH12/EX12.3/EX12_3.sce | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/1757/CH12/EX12.3/EX12_3.sce b/1757/CH12/EX12.3/EX12_3.sce new file mode 100755 index 000000000..08e72b336 --- /dev/null +++ b/1757/CH12/EX12.3/EX12_3.sce @@ -0,0 +1,30 @@ +//Example12.3 // to determine the binary output of the 8-bit dual slope A/D converter
+clc;
+clear;
+close;
+Vin = 8.5 ;
+VR = 10 ;
+f = 2 ; //MHz
+N = 8 ;
+C = 0.1*10^-6 ;
+R = 2*10^3 ;
+
+// the output of integrator is defined as
+// Viao(T1) = -(Vin/R*C)*T1 ;
+
+// charging time of capacitor
+T1 = 2^N/f ;
+disp('charging time of capacitor is = '+string(T1)+ ' u sec');
+
+// the integrator output
+T1 = T1*10^-6 ;
+Viao =-(Vin/(R*C))*T1;
+disp('the integrator output is = '+string(Viao)+ ' V');
+
+// the binary output of a dual slope A/D converter
+Bn = (2^N*Vin)/VR;
+disp('the decimal output of a dual slope A/D converter is = '+string(Bn)+ ' = 218' );
+
+Bn=218;
+Bn = dec2bin(Bn) ;
+disp(' The binary output of a dual slope A/D converter is = '+string(Bn)+ ' ' );
|