Copyright © 2007 Atmel Corporation
The QDEC is used in rotating motion systems for position and speed detection. It decodes quadrature signals, normally two 90 degrees out-of-phases pulses, into count and direction informations. The quadrature signals are usually generated by a wheel with periodic transparent gaps (a.k.a. lines) and an optical system composed of one light source and 2 sensors.
The driver is composed of qdec.c and qdec.h.
An example is available: How to use the QDEC in timer mode.