cancel
Showing results for 
Search instead for 
Did you mean: 

Encoder mode counter division possibilities?

xgn
Associate II

Now every rising and fall edge are counted which results in counter incrementing by 4. I see and have tried playing with Prescaler Division Ratio which should normally be the parameter to divide incremental number but it does not work on Encoder mode. The MCU here used is STM32F407.

Is it possible to do in any way?

0693W00000Stgh4QAB.png

3 REPLIES 3

Not in hardware, only in software, when processing​ the readout value. It's mostly just /2, anyway.

JW​

Thanks for the information @Community member​ 

I just now set the general Prescaler to (4-1) which seems at the very first was not somehow generated by the CubeMX into the code (?). Nevertheless, encoder does work in both directions and no issues are seen as currently operated by the hand. Counter shows 1000 per revolution as supposed according to the encoder model. And it goes (-)1000 turned backwards.

As I wrote in that article I gave link to above:

> While the encoder is turned/moved only to one direction, it works quite OK,

> but as soon as direction changes, counts may start to be missing, or behave "strange" and "unpredictible".

JW