This dual-channel frequency counter work based on 920 kHz microcontroller-based frequency counter. First channel has 99 MHz upper limit of frequency, and the second channel has 920 kHz upper limit of frequency. For the beginner, you can read the basic operation of this frequency counter and learn our old project.
We have extended the upper limit of maximum frequency that can be counted by adding 74HC393 divider. This CMOS IC is a dual 4-bit binary ripple counter. The operation of each half of this device is the same as the 393 series except no external connection are required.
To maintenance of the accuracy of counting, we cut the upper limit of frequency range feed to timer 0 of AT89S52 microcontroller that can be counted at 900 kHz. By using the all the flip-flop of 74HC393, we can build 8-bit counter. This must be a counter with modulus of 256. But 74HC393 have a maximum clock input frequency of 99 MHz. So, to maximize the accuracy, we only operate this device as 3-bit and 4-bit counter. Counter 0 was operated as 3-bit counter and counter 1 operated as 4-bit counter.
The range of incoming frequency was divided by three.
- Low Frequency (LF): 0 Hz ~ 899,999 Hz. This incoming frequency can feed through T0 pin of microcontroller. To display the value of incoming frequency is the same of our old project.
- Medium Frequency (MF): 900,000 Hz ~ 7,199,999 Hz. This incoming frequency must feed to T0 pin of microcontroller via a 3-bit counter/divider. To display the value of incoming frequency, the number of pulse that was counted by timer 0 must be multiplied by eight. To maintenance the accuracy, we cut the least significant digit of display. The display format is X,XXX.XX kHz.
- High Frequency (HF): 7,200,000 Hz ~ 99 MHz. This incoming frequency must feed to T0 pin of microcontroller via a 3-bit and 4-bit counter/divider. To display the value of incoming frequency, the number of pulse that was counted by timer 0 must be multiplied by 128. To maintenance the accuracy, we cut the two least significant digits of display. The display format is XX,XXX.X kHz. To display the frequency between 99 MHz and 100 MHz is still on experiment.
It’s not convenient for user to select a switch to match between the incoming frequency and those three ranges above.
So, we make an auto-select subroutine program to automatic select the best range that will be used. This subroutine will drive the some open-collector configurations of counter output that builds five switches. So we only connect the probe to feed the incoming frequency, wait 1 second, and read the display.