34.1.3 Programmable Gain Options
The gain of the OPA module can be controlled either using external components to provide feedback or internally, using a built-in resistor ladder. When using the built-in programmable gain options of the OPA module, the internal resistor ladder must be enabled by setting the Resister Ladder Enable (RESON) bit. Once enabled, the nominal gain of the amplifier can be selected using the Op Amp Gain Selection (GSEL) bits.
The internal sources to the operational amplifier must be configured based on the OPA mode of operation, when using the built-in programmable gain options. The PCH and NCH bits can be used to connect the internal resistor ladder to the positive or negative input of the operational amplifier, respectively, creating the feedback network needed to control the gain of the circuit.
If the OPA module is being used in the noninverting configuration, the NCH bits may be configured so that the internal resistor ladder is connected to the negative input of the operational amplifier. If the OPA module is being used in an inverting configuration, the PCH bits may be configured so that the internal resistor ladder is connected to the positive input of the operational amplifier.