Teensy 4.1 FreqCount GateInterval

cgeber24

Active member
The FreqCount library documentation states that for FreqCount.begin (GateInterval), the GateInterval is in milliseconds.

However, on my Teensy 4.1 it appears that this GateInterval is in microseconds - I am trying to specify a 100 millisecond GateInterval, and this code:

FreqCount.begin (100000);

if (FreqCount.available())
CHM_state.tachometer = FreqCount.read();


returns the expected value of 125 for a 1.25KHz input waveform.

Am I missing something here? Thanks!
 
The FreqCount library documentation states that for FreqCount.begin (GateInterval), the GateInterval is in milliseconds.

However, on my Teensy 4.1 it appears that this GateInterval is in microseconds -
You are correct about millisec for T3 and microsec for T4. I would say it's not well documented.
 
Perhaps I should have said it's an unexpected difference in the FreqCount library between T3 and T4. I think there is at least one example sketch the mentions the use of usec for T4 versus msec for T3.
 
Quite Correct Joe! Example FreqCount/Serial_output_T4 shows the T4 Gate Interval expressed in microseconds...Thanks!
 
Back
Top