3.2 Зарядні пристрої.

Програма 3.2.

10 CLEAR 65300: DIM A(64)

13 LET К = 14.028/14

15 LET N=1

16 LET KD=N

20 FOR I = 1 ТО 1964

30 READ A(l): POKE (65300+I),A(I)

40 NEXT I

50 DATA 243,1,0,0,17,141,55,219

60 DATA 254,203,119,40,10,0,0,0

70 DATA 19,122,183,32,242,24,7,0

80 DATA 19,3,122,183,32,8,33,85

90 DATA 255,112,35,113,251,201,219,254

100 DATA 203,119,40,10,0,0,0,19

110 DATA 122,183,32,211,24,232,0,0

120 DATA 0,19,122,183,32,232,24,222

125 INPUT “V max = “;M

135 PRINT AT 10,6;”V max -“;M

140 OUT 254,7: RANDOMIZE USR 65301

150 LET F=256*PEEK 65365+PEEK 65366-1

160 IF F<0 THEN LET F=0

174 LET V – (388 – INT(F*K*KD)/0.951)*0.0519

175 PRINT AT 12,6;”VOLT.”;AT 12,16;* “; AT 12,16;V

176 IF V >= M THEN GO SUB 1000

177 PAUSE 100

180 GO TO 140

1000 FOR N = 1 TO 30000

1010 OUT 254,24

1020 OUT 254,0

1030 NEXT N

1040 RETURN