Datasheet
78K0/Ix2 CHAPTER 13 COMPARATORS
R01UH0010EJ0500 Rev.5.00 422
Feb 28, 2012
When using P23/ANI3/CMP2+, P24/ANI4/CMP0+, P25/ANI5/CMP1+, P26/ANI6/CMPCOM, set the registers according
to the pin function to be used (refer to Tables 13-2 and 13-3).
Table 13-2. Setting Functions of P23/ANI3/CMP2+, P24/ANI4/CMP0+, P25/ANI5/CMP1+ Pins
ADPC0
Register
PM2 Register CMPmEN bit
(m = 0 to 2)
ADS Register
(n = 3 to 5)
P23/ANI3/CMP2+, P24/ANI4/CMP0+,
P25/ANI5/CMP1+ Pins
Selects ANIn. Setting prohibited Input mode
Does not select ANIn. Digital input
Selects ANIn. Setting prohibited
Digital I/O
selection
Output mode
Does not select ANIn. Digital output
Selects ANIn. Analog input (to be converted into digital signal) 0
Does not select ANIn. Analog input (not to be converted into digital signal)
Selects ANIn. Analog input (to be converted into digital signal), and
comparator input
Input mode
1
Does not select ANIn. Comparator input
Analog input
selection
Output mode
Setting prohibited
Remark ADPC0: A/D port configuration register 0
PM2: Port mode register 2
CMPmEN: Bit 7 of comparator m control register (CmCTL)
ADS: Analog input channel specification register
Table 13-3. Setting Functions of P26/ANI6/CMPCOM Pin
ADPC0
Register
PM2 Register CmMODSEL1
bit (m = 0 to 2)
CmMODSEL0
bit (m = 0 to 2)
ADS Register P26/ANI6/CMPCOM Pin
Selects ANI6. Setting prohibited Input mode
Does not select ANI6. Digital input
Selects ANI6. Setting prohibited
Digital I/O
selection
Output mode
Does not select ANI6. Digital output
Selects ANI6. Analog input (to be converted into
digital signal)
CmMODSEL1 = 0, or
CmMODSEL0 = 0
Does not select ANI6. Analog input (not to be converted
into digital signal)
Selects ANI6. Analog input (to be converted into
digital signal), and comparator
common input
Input mode
CmMODSEL1 = 1, and
CmMODSEL0 = 1
Does not select ANI6. Comparator common input
Analog input
selection
Output mode
Setting prohibited
Remark ADPC0: A/D port configuration register 0
PM2: Port mode register 2
CmMODSEL1, CmMODSEL0: Bits 4 and 3 of comparator m control register (CmCTL)
ADS: Analog input channel specification register