potentiometerx is connected to pin4/PORTA.3/AN3
Pin 4 is RA3/MCLR/VPP not an3 and not an analog pin
AN3 is RA4 Pin 3 that you are trying to use for led 6
there is no #config info in you post so the actual configuration of pin 4 is unknowable here
Bookmarks