Quote Originally Posted by richard View Post
Ports C are all ttl inputs

would be a bad move , st inputs are less susceptible to noise leave INLVLX as default

WDTE_OFF has no effect unless u had defined NO_CLRWDT 1

PWRTE_OFF
Clutching at straws and randomly poking at register settings is not a good solution
to noise induced issues and or defective code

ANSELA = PORTA.2 ' MAKE ANALOG INPUT

as pointed out by tumbleweed won't do anything like what you need


I need porta.2 to be a analog input - the rest are not analog - so how do I do that?