8 years, 8 months ago.

How to use the position compare interrupts in the QEI of an LPC1768

The user manual states:

26.6.3.3 QEI Position Compare register 0 (CMPOS0 - 0x400B C014) This register contains a position compare value. This value is compared against the current value of the position register. Interrupts can be enabled to interrupt when the compare value is equal to the current value of the position register.

I know what I wish to do in an ISR that would be called when the position register equals the position compare register as stated in the user manual snippet above, but confused about how to connect an ISR to the position = position compare event stated.

Confusing to say the least. Thank you in advance for any and all advice.

Question relating to:

Quadrature encoder interface library. Encoder, QEI, quadrature

1 Answer

8 years, 8 months ago.

If you look at the QEI_hw it is covered in the source code https://developer.mbed.org/users/hexley/code/QEI_hw/file/53f8ae2cf502/qeihw.cpp

Accepted Answer