Attiny3226 and Freqcount library

I want to Freqcount library for Attiny3226. The library is here: PaulStoffregen/FreqCount: Measures the frequency of a signal by counting the number of pulses during a fixed time. (github.com)

What kind of changes do I have to make in this library's FreqCountTimers.h or other files for Attiny3226 (Megatinycore)?
I also use the TCA0 timer to generate bit PWM on the same processor. Do I have problems with PWM or frequency counting?

After a quick glance in the source I think the hardware dependent coding is all in the UTIL subdirectory. You would have to add the timer definitions for the Attiny3226 (family) there and give it a try.

Maybe easier to program TCB yourself as it supports Input Capture Frequency Measurement.

1 Like

Thanks.

Please give me a sample configuration for Attiny3226's TCB.

I want to frequency counting max 40Khz.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.