Datasheet
78K0/Kx2-L CHAPTER 13 OPERATIONAL AMPLIFIERS
R01UH0028EJ0400 Rev.4.00 445
Sep 27, 2010
13.4 Operational Amplifier Operations
The operational amplifiers 0 and 1 have the following mode.
• Single AMP mode (operational amplifiers 0 and 1)
• PGA (Programmable gain amplifier) mode (operational amplifier 0 only)
13.4.1 Single AMP mode (operational amplifiers 0 and 1)
Operational amplifiers 0 and 1 both have two input pins (the AMPn- pin and the AMPn+ pin) and one output pin (the
AMPnOUT pin), and can be used as single-power supply amplifiers that can be externally connected.
The amplified voltage can be used as an analog input of the A/D converter, because the AMPnOUT pin is alternatively
used with analog input pin of the A/D converter.
The procedure for starting operation in single amplifier mode is described below.
<1> Use the ADPCn register to set the pins (AMPn−, AMPn+, AMPnOUT) to be used in single amplifier mode as
analog I/O.
<2> Use the PMx register to set the pins (AMPn−, AMPn+, AMPnOUT) to be used in single amplifier mode to input
mode.
<3> Set (1) the OPAMPnE bit and enable operation in single amplifier mode.
Caution To use as an input of the A/D converter a voltage that has been amplified in single amplifier mode,
enable operation in single amplifier mode before selecting an analog input channel by using the ADS
register.
Remark Products with operational amplifier of the 78K0/KY2-L and 78K0/KA2-L: n = 0, x = 2
Products with operational amplifier of the 78K0/KB2-L and 78K0/KC2-L: n = 0, 1, x = 2, 1
13.4.2 PGA (Programmable gain amplifier) mode (operational amplifier 0 only)
In this mode, the analog voltage input from the PGAIN pin is amplified within the microcontroller. The gain can be
selected from four types (¯4, ¯8, ¯16, ¯32).
The amplified voltage can be used as an analog input of the A/D converter.
The procedure for starting operation in PGA mode is described below.
<1> Use the ADPC0 register to set the pins (PGAIN) to be used in PGA mode as analog I/O.
<2> Use the PM2 register to set the pins (PGAIN) to be used in PGA mode to input mode.
<3> Use the AMP0VG0 and AMP0VG1 bits to select the gain (¯4, ¯8, ¯16, ¯32).
<4> Set (1) the PGAEN bit and enable operation in PGA mode.
Caution To use as an input of the A/D converter a voltage that has been amplified in PGA mode, enable
operation in PGA mode before selecting an analog input channel by using the ADS register.