1.1 вимірювання частоти.

Програма 1.1.

10 CLEAR 65300; DIM A(64)

12 INPUT “FREQUENCY OF QUARTZ =”;Q

13 LET K=Q/14

15 INPUT “1:N”;N

16 LET KD=N

20 FOR I=1 TO 64

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

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

130 PRINT AT 9,6;”FREQUENCY:”;AT 9,26;”(Hz)”

135 PRINT AT 10,6;”1:N”;KD

140 OUT 254,7: RANDOMIZE USR 65301

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

160 IF F<0 THEN LET F=0

170 PRINT AT 9,16;” “;AT 9,16;INT((F*K*KD)/0.951)

180 GO TO 140