Frequency counter with PIC16F628A
This is a frequency counter based on PIC16F628A. The original idea came from this project: LCD frequency counter. As you can see – very simple and yet elegant schematic. But I wanted to use 7-segment LED display, not LCD, so I found a second useful project: Simple 100MHz frequency counter which uses 6 digit LED display.
Combining two projects into one wasn’t very easy. First of all I wanted a PIC microcontroller to do the whole job without any additional ICs. Also I wanted to use the the familiar 16F628A, but because one of the portA pins (RA5) can be used only as input I was short of outputs to do the job. Driving 6 digit 7-segment multiplexed display requires 7 + 6 = 13 outputs. The 16F628A has 16 IO pins, two of which are used for the crystal oscillator, one is for the signal input and other one can be used only for input, that leaves us with only 12 useful IO pins. The solution was to drive one of the common cathodes with a transistor, which opens when all other digits are switched off.
For more detail: Frequency counter with PIC16F628A