Download Print this page

Espressif ESP32 Technical Reference Manual page 501

Hide thumbs Also See for ESP32:

Advertisement

17 Pulse Count Controller (PCNT)
17 Pulse Count Controller (PCNT)
17.1 Overview
The pulse counter module is designed to count the number of rising and/or falling edges of an input signal.
Each pulse counter unit has a 16-bit signed counter register and two channels that can be configured to either
increment or decrement the counter. Each channel has a signal input that accepts signal edges to be detected,
as well as a control input that can be used to enable or disable the signal input. The inputs have optional filters
that can be used to discard unwanted glitches in the signal.
The pulse counter has eight independent units, referred to as PULSE_CNT_Un.
The maximum frequency of pulses supported by ESP32's pulse counter is 40 MHz.
17.2 Functional Description
17.2.1 Architecture
Figure 17-1. PULSE_CNT Architecture
The architecture of a pulse counter unit is illustrated in Figure 17-1. Each unit has two channels: ch0 and ch1,
which are functionally equivalent. Each channel has a signal input, as well as a control input, which can both
be connected to I/O pads. The counting behavior on both the positive and negative edge can be configured
separately to increase, decrease, or do nothing to the counter value. Separately, for both control signal levels,
the hardware can be configured to modify the edge action: invert it, disable it, or do nothing. The counter itself
Espressif Systems
501
ESP32 TRM (Version 5.2)
Submit Documentation Feedback

Advertisement

loading
Need help?

Need help?

Do you have a question about the ESP32 and is the answer not in the manual?

Subscribe to Our Youtube Channel