
dsPIC33/PIC24 Family Reference Manual
DS70005146B-page 6 2014-2015 Microchip Technology Inc.
3.0 MODULE APPLICATION
3.1 Module Description
The Programmable Gain Amplifiers are used as voltage amplifiers; for example, amplification of
voltage across burden resistors or shunt resistors for current sensing. The Programmable Gain
Amplifiers’ output voltage can be read by any of the dedicated Sample-and-Hold circuits on the
ADC module. The PGA’s output voltage may also be used as the input to the comparator module
for overcurrent/voltage protection.
3.2 Basic Operation
The PGAx module is enabled by setting the PGAEN (PGAxCON<15>) bit to one. When the
module is disabled (PGAEN = 0), the output is placed in a high-impedance state.
The gain of the PGAx module is selectable through the GAIN<2:0> bits in the PGAxCON register.
There are five selectable gains, ranging from 4x to 64x. The SELPI<2:0> and SELNI<2:0> bits
in the PGAxCON register select one of four positive or negative inputs to the PGAx module.
For single-ended applications, the SELNI<2:0> bits will select the ground as the negative input
source. To provide an independent ground reference, the PGAxN2 and PGAxN3 pins are
available as the negative input source to the PGAx module.
The output voltage of the PGAx module can be connected to the DACOUTx pin by setting the
PGAOEN bit in the PGAxCON register. When the PGAOEN bit is enabled, the output voltage of
PGA1 is connected to DACOUT1 and PGA2 is connected to DACOUT2. For devices with a
single DACOUT pin, the output voltage of PGA2 can be connected to DACOUT1 by configuring
the DBCC bit (FDEVOPT<6>) in the Configuration register. If both the DAC output voltage and
PGA output voltage are connected to the DACOUT pin, the resulting output voltage would be a
combination of the two signals. There is no assigned priority between the PGAx module and the
DACx module.
To achieve the desired offset voltage specifications, calibration values are fed into the PGAxCAL
register. This calibration data is stored in program memory (Flash).