Arduino Mega 2560 frequency measure not working for me

I have been measuring frequency (via FreqMeasure lib) with Uno with no problems. I upgraded to Mega 2560 and cannot get the freq measure to work. I know my input signal (set with “tone” in the code below) is working as I have it hooked to an oscilloscope in real time when trying the FreqMeasure code.

References I have been using:

My basic program:

//trying to read oscillating signal through pins 47, 48, or 49 - none work for me.

#include <FreqMeasure.h>
void setup() {
  tone(7, 1000);    // set up oscillating signal on Digital I/O 7.  Connect this pin to inputs 47 or 48 or 49
void loop() {
    float freq = FreqMeasure.countToFrequency(;
    Serial.println(freq);   // Always reads 0

Given the lack of success, I have been trying to read off of pins 47, 48, and 49. From my homework, I thought 49 was the correct one… but no luck. In addition, I have tried using either CAPTURE_USE_TIMER4 or CAPTURE_USE_TIMER5 in my \libraries\FreqMeasure-1.2.0\util\FreqMeasureCapture.h file, shown here:

// Arduino Mega
#elif defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
//#define CAPTURE_USE_TIMER4       // ICP4 is pin 49 
#define CAPTURE_USE_TIMER5    // ICP5 is pin 48

I also tried the FreqCount (GitHub - PaulStoffregen/FreqCount: Measures the frequency of a signal by counting the number of pulses during a fixed time.) option, but get an error when calling it from my program via the #include <FreqCount.h> statement.

I am stuck… any suggestions?

Thank you!

Ah, I appologize... the code above works, but it cannot measure a 1kHz signal. It is working for slower signals. Interesting on the Uno, I can measure much faster signals with this code.

If you want responses, ask one of the mods to move this to an appropriate section. You picked a section that CLEARLY says

For problems with Arduino itself, NOT your project

So you are being ignored for the most part. It might help to go read the documentation on the library you are using if you haven't. There might be many clues in there. When I looked, it mentioned something very specific about the 1kHz line.