summaryrefslogtreecommitdiff
path: root/911/CH10/EX10.3/ex_10_3.sce
blob: 7283ae102a01c7fb805d342778e39c4b39781298 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
//example 10.3//
clc
//clears the screen//
clear
//clears all variables//
f=5/1000;
//full scale output in Amperes//
g=2^8;
//random value for use//
s=f/(g-1);
//step size = full scale output/ number of steps//
d=bin2dec('10000010')
//binary to decimal conversion//
ao=d*s;
//analog output of system//
e=.25*f/100;
//error =+-e//
r0=(ao-e)*1000;
//lower range of analog output//
r1=(ao+e)*1000;
//upper range of analog output//
disp(r0, 'lower range of analog output (in mA) is =');
disp(r1, 'upper range of analog output (in mA) is = ');