Page 1 of 1
Need help regarding pcnt interface example into ESP32
Posted: Mon Oct 15, 2018 1:28 pm
by Ritesh
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
Re: Need help regarding pcnt interface example into ESP32
Posted: Mon Oct 15, 2018 1:30 pm
by Ritesh
Hi ESP_Sprite,
Let me know if need anything else from my side regarding same.
Re: Need help regarding pcnt interface example into ESP32
Posted: Mon Oct 15, 2018 9:29 pm
by WiFive
Re: Need help regarding pcnt interface example into ESP32
Posted: Tue Oct 16, 2018 4:09 am
by Ritesh
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?
Re: Need help regarding pcnt interface example into ESP32
Posted: Tue Oct 16, 2018 5:21 am
by WiFive
PCNT is for counting pulses not measuring pulses
Re: Need help regarding pcnt interface example into ESP32
Posted: Tue Oct 16, 2018 8:24 am
by Ritesh
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
Re: Need help regarding pcnt interface example into ESP32
Posted: Tue Oct 16, 2018 8:50 am
by WiFive
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.
Re: Need help regarding pcnt interface example into ESP32
Posted: Tue Oct 16, 2018 9:51 am
by Ritesh
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