
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.
Bookmarks