Quadrature encoder and loop count
After much our spend it work in interrupt's like Henrik suggest me and I am nearly finish.
Need only one sugget more from peoples here.
Next problem or maybe not :?
QEI counter count in circles up/down for example 0-1999 and oposite 1999-0...in 4X mode.
Now when I am at position 100 for example and command new position - 100 pulses motor will go to 0 and stop - OK but if maybe inertia of shaft move QEI only one step down then here is problem Setpoint is on position 0 value but QEI is 1999!
I am little confused on how to set relation between Setpoint and QEI register of position ?
I want to move motor to any direction with PID without limit of numbers of turn to+ or minus.
Maybe I ned dead zero like minus limit /?
Any suggest.
Regards Robert:)