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 --- 1850/CH8/EX8.14/exa_8_14.sce | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 1850/CH8/EX8.14/exa_8_14.sce (limited to '1850/CH8/EX8.14') 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") + -- cgit