The program make short (0.125s) test of the input signal to determine the prescaler value. Next is the actual counting with the proper prescaler value and then the result is send to the display.
This is fast breadboard proof-of-concept project, and I don't intend to make a finished product, for now at least. Of course there must be some sort of preamplifier/protection in front of the frequency counter in order to be usable.
In the pictures below is shown the breadboard and five different quartz crystals generating different frequencies. The differences between the value on the display and the value on the oscilloscope are negligible. I tested the schematic also with frequencies above 90 MHz and even above 100Mhz and the results was accurate, but of course most significant digit was lost in case of 100+ MHz.
Link for downloading the code and .hex files: LINK