summaryrefslogtreecommitdiff
path: root/3682/CH10/EX10.4/Ex10_4.sce
blob: 2d8f56861e91a00a715497ea25215bf62fd8d019 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// Exa 10.4

clc;
clear;

// Given data

// A 16 bit dual slope ADC is specified
n = 16; // 16 bit counter
CR = 4*10^6; // clock rate in Hz
Vimax = 10; // Maximum input  voltage
Vomax= -8; // Maximum integrator output voltage
C = 0.1*10^-6; // Capacitor(Farads)

// Solution

//Referring Eqn 10.4, 10.5, 10.6, 10.7 given on page no 364 and 365;

T1 = 2^n/CR; // Time Period
// For the integrator
// dell Vo= (-1/RC)*Vmax*T1;
// Therefore
R = -(Vimax*T1)/(Vomax*C); // Resistor value 
printf('The value of resistor R of the integrator is %d kΩ. \n ',round(R/1000));