You need to look at ex_adc_epgs.c
This is the example of using the ADC on this type of chip.
There are several more things that have to be setup, than simply the master clock....
I’m trying to set the internal pull-ups on PORTD in a PIC18F45K40. In the other ports I used port_x_pullups(), but in PORTD this function is not implemented. Verifying the PIC datasheet I ...