7.2 Timing, Measurement, and Waveforms

Position Decoder (PDEC)

Some PIC32CM family of devices include a Position Decoder (PDEC) peripheral for precise position and speed measurement in motor control and motion applications. The PDEC integrates a quadrature/ Hall decoder and a counter with two compare channels, supporting multiple modes of operation.

The following are key features of the PDEC:

  • Internal prescaler: Allows input signal frequency scaling for optimal performance and resolution
  • Selectable modes: Quadrature Decoder (QDEC), Hall Sensor Decoder (Hall), Counter
  • Event and interrupt generation

Frequency Measurement (FREQM)

Some PIC32CM family of devices include a Frequency Meter (FREQM) peripheral to measure the frequency of an external or internal clock signal with high accuracy and minimal CPU intervention, aiding in system calibration and ensuring timing accuracy. It is used for clock calibration, timekeeping, communication, instrumentation, and power metering.

The following are key features of the FREQM:

  • Direct frequency measurement
  • Selectable reference clock
  • High resolution: Provides precise frequency readings, suitable for calibration, diagnostics, and clock monitoring
  • Interrupt and event generation
  • Low-power operation