Quote Originally Posted by HenrikOlsson
Hi,
The 'F675 has one comparator AND an A/D converter.
The comparator is turned off with CMCON=7 and the the pins for the A/D is set to digital only with ANSEL=0.

However....

You're using GP3 for your input and that pin is not connected to either the comparator or the A/D so none of the above should really matter but I'm not sure. GP3 is however the MCLR pin and it seems you have a typo in your config setting. I THINK it should be MCLR_OFF and not MCLRE_OFF. - try it.

Also, you're using a byte-size variable to store the pulsewidth, try switching that to a Word instead.

/Henrik Olsson.

I tried swapping back and forth on ANSEL and CMCON neither seem to make a difference. Also when I change to MCLR_OFF it errors and will not even compile.

I tried using word as well no luck.