i m confuse in Quadrature Encoder Mode Counter in ADSP-BF506F EZ-KIT Lite...got any example to help...thks
I believe, the HRM gives sufficient information about this mode. As explained in HRM, ‘In this mode, the CUD:CDG inputs expect a quadrature-encoded signal that is interpreted as a 2-bit gray code’.
You should try any simple code to understand this mode.
Regarding example code, the smallest code can be writing to only CNT_CONFIG register. But you can add interrupt, debouncing, time measurement features as per requirement. Refer HRM.
For the reference you can use BF548 EZ-KIT’s rotary counter project available in VDSP installation folder. This code is developed using ADI Device Drivers. It is written for ‘directional count mode’, but you can easily change it for ‘Quadrature Encoder Mode’.
(You can also refer 'rotary counter test' in 'power-On self test' projects)
Please note that, BF548 EZ-KIT has ‘CTS Corp rotary encoder’, which outputs 2-bit gray code. (For mode0) If you rotate it by 1 step clockwise, the CUD: CDG changes as 11-10-00-01-11, increasing the count by 4. Sim for 1 step anti-clockwise rotation, o/p changes as 11-01-00-10-11, decreasing the counter by 4.
Hope it helps.
Retrieving data ...