32.4.2.2 Gain Control Using External Resistor

The Op Amp supports non-unity gain configurations using an external resistor. To configure the Op Amp in this gain configuration, set the UGE bit to ‘0’ in the AMPxCON1 register.

Op Amp Fixed Gain Amplifier with External Resistor

AMP1CON1bits.AMPEN = 1;    //Enable Op Amp 1
AMP1CON1bits.UGE = 0;      //Disable unity gain mode