Datasheet

78K0/Ix2 CHAPTER 13 COMPARATORS
R01UH0010EJ0500 Rev.5.00 420
Feb 28, 2012
(4) 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.
When CMP0+/P24/ANI4, CMP1+/P25/ANI5, and CMP2+/P23/ANI3 pins, and CMPCOM/P26/ANI6 pin
Note
are used
for the comparator input and comparator common input respectively, set these pins to analog input by ADPC0.
ADPC0 can be set by a 1-bit or 8-bit memory manipulation instruction.
Reset signal generation clears ADPC0 to 00H.
Note 78K0/IB2 only
Figure 13-9. 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.