31.3.3.5.1 Programmable Gain Amplifier

The Programmable Gain Amplifier (PGA) can be used to amplify the input signal to the ADC. The available range is from 1x to 16x gain. The PGA can be used in all operation modes.

In the default configuration, the PGA is disabled and the input signals are sampled directly into the conversion stage, i.e., without internal amplification. Depending on the input signal properties, it can be desirable to configure the internal PGA stage to amplify the signal.

The internal PGA has several desirable properties, especially in comparison to external amplifiers:

  • Small BoM
  • Low number of pins required
  • Firmware selectable gain with input multiplexing allows for flexible and feature-rich applications
  • Non-inverting amplification maintains signs/logic structure in firmware when the application requires to operate with PGA turned on and off
Using the PGA instead of direct inputs to the conversion stage has the following effects to consider:
  • The input signal is amplified, with the natural side effects of an additional amplification stage (input noise, offset and gain error) and possible saturation
  • The maximum conversion rate is slower because the ADC needs to sample the PGA
  • Power consumption is slightly increased
  • Depending on the sampling mode, the relative timing of the conversions is altered

The PGA is enabled by writing a ‘1’ to the PGA Enable (PGAEN) bit and configuring the GAIN bit field in the PGA Control (ADCn.PGACTRL) register.

The VIA bit fields in the Positive and Negative Input Multiplexer (ADCn.MUXPOS and ADCn.MUXNEG) registers determine whether the input signal is connected via the PGA. The VIA bits are shared, so a value written to the VIA bit field in MUXPOS or MUXNEG is updated in both registers. It is, therefore, not possible to have one input using the PGA and the other not using the PGA.