16.12 I/O Priorities
Each pin defaults to the data latch after Reset. Other functions are selected with the Peripheral Pin Select logic. Refer to the “PPS - Peripheral Pin Select Module” chapter for more details.
Analog input functions, such as ADC and comparator inputs, are not shown in the Peripheral Pin Select lists. These inputs are active when the I/O pin is set for Analog mode using the ANSELx register. Digital output functions may continue to control the pin when it is in Analog mode.
Analog outputs, when enabled, take priority over digital outputs and force the digital output driver into a High-Impedance state.
The pin function priorities are as follows:
- Port functions determined by the Configuration bits.
- Analog outputs (input buffers must be disabled).
- Analog inputs.
- Port inputs and outputs from PPS.