Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
9 years, 6 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:

1 Answer
9 years, 6 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