Frequency Counting Nascom
by J.A. Hart
This program measures frequency, time is kept track of using
register BC. The port is sampled for approx. 2,000,000 T states
or 1 second. The number of cycles are counted in the HL register
pair. The number of cycles counted is converted to decimal and
then displayed giving a counting display.
The program will work at 2 MHz without wait states or 4 MHz
without wait states. At 4 MHz location 0CCFH should be ADD HL,HL
as the port is only scanned for half a second and the number of
cycles counted is only half compared to operation at 2 MHz for
the same input frequency. The accuracy is dependent on the
Nascom clock oscillator and should be O.K. for tuning UART
Serial Clock oscillators.