This code example show how to configure the Counter and Timer blocks in ADSP-CM40x for a typical incremental encoder application. The code example is designed to run on a standard ADSP-CM408 EZ-kit without any Motor Control extender boards.
The main features of the example are:
Configure CNT1 to capture motor position from an incremental encoder outputting a 2-bit grey code
Use TMR7 to measure motor speed (M-by-N method)
Calculate motor speed using position information (M-by-T method)
Interrupt setup and servicing.
For more information see the Release Note found in the zip-file.
Attachments:
8468.QEP.zip