Introduction to Application Example

In the code example, one of the OPAMPs is configured as a Non-Inverting Programmable Gain Amplifier (PGA) with output internally connected to the ADC module for signal sampling. The input reference signal is connected to the non-inverting (positive) input while the inverting (negative) input and the output is connected in a closed loop with an internal resistor ladder, as can be seen in Figure 2. For a non-inverting PGA, the ideal amplified output is given by the equation: Vout = Vin (1 + R2/R1), which is derived using the two laws of an ideal op-amp.

The example is useful e.g. when sampling a low voltage measurement and there is a need for gain amplification. Recalling the laws for an ideal op-amp, no current flows into the inputs. This property, known as buffering, is valuable for minimizing the impact of the measurement on the actual voltage.