summaryrefslogtreecommitdiff
path: root/1850/CH8/EX8.14/exa_8_14.sce
diff options
context:
space:
mode:
Diffstat (limited to '1850/CH8/EX8.14/exa_8_14.sce')
-rwxr-xr-x1850/CH8/EX8.14/exa_8_14.sce25
1 files changed, 25 insertions, 0 deletions
diff --git a/1850/CH8/EX8.14/exa_8_14.sce b/1850/CH8/EX8.14/exa_8_14.sce
new file mode 100755
index 000000000..e1ecb2471
--- /dev/null
+++ b/1850/CH8/EX8.14/exa_8_14.sce
@@ -0,0 +1,25 @@
+// Exa 8.14
+clc;
+clear;
+close;
+//given data
+f=75;// in MHz
+f=f*10^6;// in Hz
+// For an 8-bit converter reference voltage
+V_REF= 100;// in volt
+// For setting D7=1
+Vo_7= V_REF*2^7/2^8;//in volt
+// For setting D6=1
+Vo_6= V_REF*2^6/2^8;//in volt
+// For setting D7=1 and D6=1
+Vo_76= Vo_7+Vo_6;//in volt
+// For setting D5=1 D6=1 and D7=1
+Vo_5= V_REF*2^5/2^8+Vo_7+Vo_6;//in volt
+disp(Vo_7,"For setting D7=1 output voltage in volt is :")
+disp(Vo_6,"For setting D6=1 output voltage in volt is :")
+disp(Vo_76,"For setting D7=1 and D6=1 output voltage in volt is :")
+disp(Vo_5,"For setting D5=1, D6=1 and D7=1 output voltage in volt is :")
+disp("All other digits will be set to zero or 1. Output will be accordingly indicated as a resul of successive approximation. The converted 8-bit digital form will be 1110010")
+T=1/f;// in sec
+disp(T*10^9,"Conversion time in ns")
+