Tool/software: Code Composer Studio
I am trying to read position of motor using QEI and i m giving initial value to QEI position register "0" and "6400" as maximum value.
QEIConfigure (QEI0_BASE,
(QEI_CONFIG_CAPTURE_A | QEI_CONFIG_NO_RESET | QEI_CONFIG_QUADRATURE | QEI_CONFIG_NO_SWAP,6400),
// Zero the position counter
QEIPositionSet (QEI0_BASE, 0);// initial value
x=QEIPositionGet(QEI0_BASE);
So when motor is rotating in clockwise direction x increments upto 6400 and then resets but when motor rotates in opposite direction x value changes directly from 0 to 6400 and then starts decreasing to 0, i want to measure change in position in both directions.Is there anyway i can configure QEI to give me change in position in both directions, i mean value of x changes from 0 to 6400 in one direction and from 0 to -6400.