How to use the Analog Comparator

Hello,everybody~ I want to use the Analog Comparator,but I can not find a Demo,and I’m not sure how to
initialize and interrupt, is there someone can give me any advises or a demo program, thanks a lot.

Maybe start here

:) Aha~~That's just something i want, thank you very much!