PCNT (Pulse Counter) example (arduino ide)

Nikita71
Posts: 5
Joined: Thu May 27, 2021 7:08 pm

PCNT (Pulse Counter) example (arduino ide)

Postby Nikita71 » Sat Jul 17, 2021 12:07 pm

Hi. I need to count high frequency pulses. On the internet i found that the esp32 has such a thing as PCNT (Pulse Counter)
even found its description but nowhere can find an example that could ideally output the number of pulses per second in compor. Please help )

smah80
Posts: 6
Joined: Sun May 02, 2021 10:22 am

Re: PCNT (Pulse Counter) example (arduino ide)

Postby smah80 » Sun Jul 18, 2021 7:16 am

Hi,
I am also looking for a similar solution where I can count pulses for quadrature encoder running on 1500RPM.
I also found some code and look at the description on ESP-IDF of PCNT, but not able to understand how to connect my A,B,Z pulses encoder with it.

Also feel difficult to understand tasks. is there any good tutorial with example? or at-least a simple example of using quadrature encoder.

any help will be highly appreciated.

Thanks

smah80
Posts: 6
Joined: Sun May 02, 2021 10:22 am

Re: PCNT (Pulse Counter) example (arduino ide)

Postby smah80 » Fri Sep 03, 2021 12:59 pm

Any help in this regard?

tommeyers
Posts: 184
Joined: Tue Apr 17, 2018 1:51 pm
Location: Santiago, Dominican Republic

Re: PCNT (Pulse Counter) example (arduino ide)

Postby tommeyers » Fri Sep 03, 2021 7:02 pm

I googled: "esp32 pulse count"

This looks promising: https://docs.espressif.com/projects/esp ... /pcnt.html

What did you look for?

Tom
IT Professional, Maker
Santiago, Dominican Republic

smah80
Posts: 6
Joined: Sun May 02, 2021 10:22 am

Re: PCNT (Pulse Counter) example (arduino ide)

Postby smah80 » Sun Sep 05, 2021 6:21 pm

Yes I looked at it, but I am not able to understand it properly.

could you please provide a sample program for arduino ide in which I can connect a encoder using PCNT along with hardware pin schematic?

tommeyers
Posts: 184
Joined: Tue Apr 17, 2018 1:51 pm
Location: Santiago, Dominican Republic

Re: PCNT (Pulse Counter) example (arduino ide)

Postby tommeyers » Mon Sep 06, 2021 6:15 pm

IT Professional, Maker
Santiago, Dominican Republic

Who is online

Users browsing this forum: No registered users and 96 guests