Position Decoder Driver

The Position Decoder (PDEC) driver provides an interface for detection the movement of a motor axis.

The following driver variant is available:

  • PDEC Asynchronous Driver: The driver supports a callback handler for the IRQ caused by hardware state changes. Functionality is asynchronous to the main clock of the MCU.

PDEC Basics and Best Practice

Position decoder can be used for a wide range of applications. The driver supports both motor axis position and window monitor position. The window monitor can be used to monitor the axis position and compare it to a predefined threshold. The callback function can be registered as overflow interrupt, direction interrupt, position changed interrupt, and error interrupt. Once the condition happens, the callback function is invoked to notify the application.

Normally a PDEC operates in QDEC mode. This mode can be used to measure the position, rotation, and speed of motor, to detect the missing pulse and auto-correction. There are three signal inputs in this mode. Signal 0 and Signal 1 control logic inputs refer to Phase A and Phase B in the quadrature decoder direction mode, and to count/direction in the decoder direction mode. The Signal 3 control logic input refers to the Index, in both quadrature decoder direction and decoder direction mode of the operation.