Datasheet

78K0/Ix2 CHAPTER 12 OPERATIONAL AMPLIFIER
R01UH0010EJ0500 Rev.5.00 403
Feb 28, 2012
Cautions 2. When using the single AMP mode, use the ADPC0 register to select the
AMPOUT/PGAIN/ANI1/P21, AMP-/ANI0/P20, and AMP+/ANI2/P22 pins as analog inputs.
3. When using as digital inputs the pins of port 2, which are not used with the operational amplifier,
when the operational amplifier is used, make sure that the input levels of digital input ports are
fixed to prevent degradation of the A/D conversion resolution.
Remark The output of operational amplifier is amplified by the PGA by setting OPAMP0E = PGAEN = 1.
(2) A/D port configuration register 0 (ADPC0)
ADPC0 switches the P20/AMP-/ANI0 to P27/ANI7 pins to digital I/O or analog input of port. Each bit of ADPC0
corresponds to a pin of port 2 and can be specified in 1-bit units.
Use the ADPC0 registers to select a pin used in the PGA mode or single AMP mode as an analog input.
ADPC0 can be set by a 1-bit or 8-bit memory manipulation instruction.
Reset signal generation clears ADPC0 to 00H.
Figure 12-3. Format of A/D Port Configuration Register 0 (ADPC0)
(1) 78K0/IY2
Address: FF2EH After reset: 00H R/W
Symbol 7 6 5 4 3 2 1 0
ADPC0 0 0 ADPCS5 ADPCS4 ADPCS3 0 ADPCS1 ADPCS0
(2) 78K0/IA2
Address: FF2EH After reset: 00H R/W
Symbol 7 6 5 4 3 2 1 0
ADPC0 0 0 ADPCS5 ADPCS4 ADPCS3 ADPCS2 ADPCS1 ADPCS0
(3) 78K0/IB2
Address: FF2EH After reset: 00H R/W
Symbol 7 6 5 4 3 2 1 0
ADPC0 ADPCS7 ADPCS6 ADPCS5 ADPCS4 ADPCS3 ADPCS2 ADPCS1 ADPCS0
ADPCSn Digital I/O or analog input selection (n = 0 to 7)
0 Analog input
1 Digital I/O
Cautions 1. Set the pin set to analog input to the input mode by using port mode register 2 (PM2).
2. If data is written to ADPC0, a wait cycle is generated. Do not write data to ADPC0 when the
peripheral hardware clock is stopped. For details, refer to CHAPTER 31 CAUTIONS FOR WAIT.