I am using an HF Transceiver to sample the RF and measure the frequency. I am using the Frequency Count library ( FreqCount.h) from PJRC site
with the following code.
if (FreqCount.available()) {
count = FreqCount.read();
count =count*1000;
previous_count =count;
running[ant].Frq = count;
if (count = 0) {
running[ant].Frq = 4000000;
FreqCount.end();
FreqCount.Begin();
}
}
The Code does measure the frequency, but the if (count = 0) stops the code loop. What I am trying to achieve is to measure the incoming frequency, but with the FreqCount.end() to stop measuring and remember the last measured frequency. At present removing the source frequency lead from pin 13 renders all to zero. I have tried every possible solutions except the correct one.
with the following code.
if (FreqCount.available()) {
count = FreqCount.read();
count =count*1000;
previous_count =count;
running[ant].Frq = count;
if (count = 0) {
running[ant].Frq = 4000000;
FreqCount.end();
FreqCount.Begin();
}
}
The Code does measure the frequency, but the if (count = 0) stops the code loop. What I am trying to achieve is to measure the incoming frequency, but with the FreqCount.end() to stop measuring and remember the last measured frequency. At present removing the source frequency lead from pin 13 renders all to zero. I have tried every possible solutions except the correct one.