Need help regarding pcnt interface example into ESP32

Ritesh
Posts: 1383
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Need help regarding pcnt interface example into ESP32

Postby Ritesh » Mon Oct 15, 2018 1:28 pm

Hi,

We have one project requirement in which we have taken few GPIOs as INPUT I/Os over ESP32 module (ESP32-WROVER). So, Those few INPUT GPIOs are connected with other machine's I/O pins.

So, We needs to measure timing of pulse for each I/Os with accuracy and based on that we needs decided actual logic according to that measurement.

I have checked regarding same and it seems like we can measure it using Pulse Counter (PCNT) interface module.

Let me know if I am going into wrong direction regarding same or any suggestion to do it using any other interface like PWM or any else
Regards,
Ritesh Prajapati

Ritesh
Posts: 1383
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: Need help regarding pcnt interface example into ESP32

Postby Ritesh » Mon Oct 15, 2018 1:30 pm

Hi ESP_Sprite,

Let me know if need anything else from my side regarding same.
Regards,
Ritesh Prajapati

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: Need help regarding pcnt interface example into ESP32

Postby WiFive » Mon Oct 15, 2018 9:29 pm


Ritesh
Posts: 1383
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: Need help regarding pcnt interface example into ESP32

Postby Ritesh » Tue Oct 16, 2018 4:09 am

Thanks for Reply.

Are you sure that PCNT Interface will be useful for that requirement which we want to achieve? Would you please provide sample code as well?
Regards,
Ritesh Prajapati

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: Need help regarding pcnt interface example into ESP32

Postby WiFive » Tue Oct 16, 2018 5:21 am

PCNT is for counting pulses not measuring pulses

Ritesh
Posts: 1383
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: Need help regarding pcnt interface example into ESP32

Postby Ritesh » Tue Oct 16, 2018 8:24 am

WiFive wrote:PCNT is for counting pulses not measuring pulses
Ok. Our Project requirement is to measure timing of each pulse and we need to do it for at-least 8 to 10 I/Os which are on ESP32 module itself.

So, We basically want to measure timing for each pulse in which ESP32 board's I/Os will be connected with other module from which signals will be generated as per event detection.

Hope you will understand my requirement now and please suggest interface which i can prefer for that
Regards,
Ritesh Prajapati

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: Need help regarding pcnt interface example into ESP32

Postby WiFive » Tue Oct 16, 2018 8:50 am

If you read the linked thread ESP_Sprite suggested RMT or MCPWM Capture. Since mcpwm has only 6 capture channels you probably should use RMT.

Ritesh
Posts: 1383
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: Need help regarding pcnt interface example into ESP32

Postby Ritesh » Tue Oct 16, 2018 9:51 am

WiFive wrote:If you read the linked thread ESP_Sprite suggested RMT or MCPWM Capture. Since mcpwm has only 6 capture channels you probably should use RMT.
Thanks for quick response regarding same.

So, We can only use RMT Interface as per our requirement because PCNT is just to measure counts for Pulses and MCPWM has only 6 I/Os available for that
Regards,
Ritesh Prajapati

Who is online

Users browsing this forum: No registered users and 159 guests