Minimal configuration for PCNT?

technerdchris
Posts: 3
Joined: Thu May 28, 2020 4:11 pm

Minimal configuration for PCNT?

Postby technerdchris » Thu May 28, 2020 8:19 pm

Hi,

I have a PWM set up on GPIO2 to perform a test. It would be great if I could stop the test after 2500 pulses. The previous version of the test bench used millis() and watched the time pass until 2500 * period millis had occurred and then the test stops. Now that I know PCNT exists, I want to utilize it. :geek:

To make it worse, I am using Arduino IDE, but I have things compiling ... just not sure exactly what I need to do for PCNT to work.

I saw this post about not using a control pin and also this one about Arduino IDE that I answered saying it does compile (probably awaiting approval).

Any help greatly appreciated.
Thanks,
Chris

Who is online

Users browsing this forum: justenyonyer, Majestic-12 [Bot] and 102 guests