Главная Компьютер [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] [22] [23] [24] [25] [ 26 ] [27] [28] [29] [30] [31] [32] [33] [34] [35] [36] [37] [38] [39] [40] [41] [42] [43] [44] [45] [46] b:=$3F8; П:=10; port[b+4]:=1; delay(100); port[b+3]:=64; delay (500) ,-end; procedure acquisition; begin port[b+4]:=0; d:=0; for f :=0 ton-1 do begin port[b+4]:=2; e:=port[b+6] and 16; port[b+4]:=0; if e=16 thend:=d+exp({n-l-f )*ln{2)); end; d:=(5*d)/{exp{{n)*ln{2))-l); end; procedure af f iche; begin acquisition; d:={int{100*d))/100; writeln(d); delay(500); end; begin clrscr; init; for g:=l to 20 do begin affiche; end; end. (* COPYRIGHT 1997 Patrick GUEULLE *) Устройство на базе MAX 1243 требует особого драйвера MAXIM 10.BAS и также предназначено для работы с последовательным портом СОМ1 (3F8h). 10 REM----MAXIMIO---- 20 KEY OFF:CLS 30 B=&H3F8:REMC0M1: 40 N=10: REM число разрядов 50 OUT B+4,1 60 FORT=0 TO 100:NEXTT 70 OUT B+3 , 64 80 FORT=0 TO 500:NEXTT 90 GOTO 200 100 OUT B+4, 0:D=0:REM ACQUISITION [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] [22] [23] [24] [25] [ 26 ] [27] [28] [29] [30] [31] [32] [33] [34] [35] [36] [37] [38] [39] [40] [41] [42] [43] [44] [45] [46] 0.0016 |