Datasheet
78K0/Ix2 CHAPTER 13 COMPARATORS
R01UH0010EJ0500 Rev.5.00 424
Feb 28, 2012
Figure 13-12. Example of Setting Procedure when Changing Internal Reference Voltage
Changing internal
reference voltage
Start
CnOE bit setting
Clearing (0) the CnOE bit of CnCTL and disabling
the comparator output.
Changing the internal reference voltage level by
using the CnVRS0 to CnVRS4 bits of CnRVM.
CnRVM register setting
CnOE bit setting
Note
Setting (1) the CnOE bit of CnCTL and enabling the
comparator output.
Note Set the CnOE bit to 1 when at least 5
s have elapsed after having set the CnRVM register.
13.4.2 Starting comparator operation (using input voltage from CMPCOM pin for comparator reference voltage)
F
igure 13-13. Example of Setting Procedure when Starting Comparator Operation
(Using Input Voltage from Comparator Common (CMPCOM) Pin
for Comparator Reference Voltage (78K0/IB2 only))
Start
Setting the pin to be used as a comparator input and
comparator common input to analog input.
CnOE bit setting
Note
Operation start
PM2 register setting
Setting the pin to be used as a comparator and
comparator common input to input mode.
ADPC0 register setting
CnCTL register setting
Use the CnINV bit of CnCTL to select forwarding or
reversing of the output. Setting the external reference
voltage by using the CnMODSEL0 and CnMODSEL1
bits. Use the CnDFS0 and CnDFS1 bits to select the
noise elimination width.
(Output disabled state)
Setting (1) the CnOE bit of CnCTL and enabling the
comparator output.
CMPnEN bit setting
Enable the comparator operation by setting (1) the
CMPnEN bit of CnCTL. Input to the CMPn+ pin will be
enabled at the same time.
Note Set the CnOE bit to 1 when at least 1
s have elapsed after having set the CMPnEN bit.