--- title: "Frequency Counter & Alignment Aid (Spectrum)" type: "article" slug: "frequency-counter-alignment-aid-spectrum" url: "http://localhost/article/frequency-counter-alignment-aid-spectrum/" markdown_url: "http://localhost/article/frequency-counter-alignment-aid-spectrum.md" published_at: "2026-12-01T10:02:09+00:00" modified_at: "2026-12-01T10:02:09+00:00" featured_image: url: "http://localhost/wp-content/uploads/2022/04/20230809-041332.jpg" excerpt: "Now that more US hams are adding Spectrum ROM's to their T/S 2068's, the many programs in the newsletter of the Sinclair Anateur Radio User Group of Great Britain are becoming more useful. Here is an ingenious program which allows you to use your computer as an audio frequency meter. For users of earlier T/S…" post_tag: - name: "Full Text" slug: "fulltext" taxonomy: "post_tag" url: "http://localhost/tag/fulltext/" indiv: - name: "Roger Barker" slug: "roger-barker" taxonomy: "indiv" url: "http://localhost/indiv/roger-barker/" publication: "QZX" publication_r: id: 21219 title: "QZX" type: "periodical" url: "http://localhost/periodical/qzx/" authors: "Roger Barker" volume: "3" issue: "10" issues_articles: - id: 70117 title: "QZX v3 n10" type: "issue" url: "http://localhost/issue/qzx-v3-n10/" pages: "2" pubdate: "September 1985" related_articles: - id: 42320 title: "Frequency Counter" type: "article" url: "http://localhost/article/frequency-counter/" - id: 20428 title: "A Z80 machine language program to use the ZX81 as an audio frequency counter" type: "article" url: "http://localhost/article/a-z80-machine-language-program-to-use-the-zx81-as-an-audio-frequency-counter/" archive_link: false volumeissue: "v3n10" --- # Frequency Counter & Alignment Aid (Spectrum) Now that more US hams are adding Spectrum ROM’s to their T/S 2068’s, the many programs in the newsletter of the Sinclair Anateur Radio User Group of Great Britain are becoming more useful. Here is an ingenious program which allows you to use your computer as an audio frequency meter. For users of earlier T/S models see the article by KP4MD in the October 1984 issue of QZX. *** This program displays the frequency of an audio tone input to the EAR socket of a 48K Spectrum. It uses the Spectrum interrupts as a timing reference & unless you have a poorly aligned Spectrum will give 0.1% or better accuracy! The program also allows you to input a reference frequency & gives an audible indication of how near the reference frequency is to the input frequency. Be careful when entering the DATA statements – they must be EXACTLY as shown. A checksum is incorporated to trap errors. When you RUN the program it will ask for a reference frequency; pressing ENTER at this point the program goes into counter-mode which displays the frequency input at the EAR socket, updated every second. If you input a reference frequency (line 30) then, besides displaying the frequency at the EAR socket, the program BEEPS according to the following rules. If your input is below reference frequency then it BEEPS a low tone; if above then it BEEPS a high tone. The length of the BEEP is proportional to the percentage error – if the error is 10% or greater then it’s about 1 second; the BEEP gets shorter as the %-age error decreases. When the frequency is within +/- 1 Hz of the reference, then 5 short BEEPS of a middle tone are given. This sounds complicated, but in practice is very simple to use. The great benefit is that when aligning TU’s, tone bursts, etc., you can keep your eyes on what you are doing & not have to keep looking at the screen. The Spectrum needs at least 500mv at the EAR socket for a reliable reading. The simple circuit below will amplify the input if needed. [![CA3140 input amplifier circuit for the EAR socket](http://localhost/wp-content/uploads/2026/12/qzx-new-v3n10-frequency-counter-alignment-aid-1-1024x398.png)](http://localhost/wp-content/uploads/2026/12/qzx-new-v3n10-frequency-counter-alignment-aid-1.png)CA3140 input amplifier circuit for the EAR socket ``` 1 REM *** FREQUENCY COUNTER / 2 REM *** ALIGNMENT AID. 3 REM *** 4 REM *** G4IDE JANUARY 1985 5 REM *** 10 CLEAR 65278 15 LET TOTAL=0 17 FOR I=0 TO 84 20 READ A: LET TOTAL=TOTAL+A 22 POKE (65279+I),A 24 NEXT I 26 IF TOTAL<>11122 THEN PRINT "DATA ERROR!": STOP 30 INPUT "REFERENCE TONE IN HERTZ:"; LINE A$ 40 IF A$="" THEN GO TO 500 50 FOR I=1 TO LEN A$ 60 IF CODE A$(I)<48 OR CODE A$(I)>57 THEN GO TO 30 70 LET REF=VAL A$ 80 IF REF<1 OR REF>30000 THEN GO TO 30 90 LET FREQ=INT ((USR 65298)/2) 100 PRINT AT 9,14;FREQ;" " 102 LET DIFF=FREQ-REF 103 IF DIFF>=-1 AND DIFF<=1 THEN GO TO 160 105 LET OFFSET=0 110 LET DIFF=10*DIFF/REF 120 IF DIFF<0 THEN LET DIFF=-DIFF: LET OFFSET=-50 130 IF DIFF>1 THEN LET DIFF=1 140 BEEP DIFF,40+OFFSET 150 GO TO 90 160 FOR I=1 TO 5 170 BEEP 1,20 180 NEXT I 190 GO TO 90 500 LET FREQ=INT ((USR 65298)/2) 510 PRINT AT 9,14;FREQ;" " 520 GO TO 500 1000 DATA 1,255,243,245,58,82,255,60,254,50 1010 DATA 32,1,175,50,82,255,241,251,201,243 1020 DATA 1,0,0,175,50,83,255,50,82,255 1030 DATA 111,62,254,237,71,237,94,251,58,82 1040 DATA 255,95,58,82,255,187,40,250,95,219 1050 DATA 254,230,64,87,173,40,2,3,106,58 1060 DATA 82,255,187,40,7,62,1,50,83,255 1070 DATA 24,233,58,83,255,167,40,227,243,237 1080 DATA 86,251,201,0,0 ```