Thanks for your answer - the PortA.5 was a typo error - I use PortA.4 in my sorce - I do not need to use the pin to read the result - only intern in pic but when that don't work I was trying to get it on a pin so it was visable on my develebment board.

- can you tell me if my setup of the comparator look ok ?

Best regards Erik