
Rev. 2.50
�84
��ne 22� 20��
Rev. 2.50
�85
��ne 22� 20��
HT66F20/HT66F30/HT66F40/HT66F50/HT66F60
HT66FU30/HT66FU40/HT66FU50/HT66FU60
A/D Flash MCU with EEPROM
HT66F20/HT66F30/HT66F40/HT66F50/HT66F60
HT66FU30/HT66FU40/HT66FU50/HT66FU60
A/D Flash MCU with EEPROM
Bit 3
C1OS
: Output path select
0: C1X pin
1: Internal use
This is the comparator output path select control bit. If the bit is set to "0" and the
C1SEL bit is "1" the comparator output is connected to an external C1X pin. If the
bit is set to "1" or the C1SEL bit is "0" the comparator output signal is only used
internally by the device allowing the shared comparator output pin to retain its normal
I/O operation.
Bit 2~1
Unimplemented, read as “0”
Bit 0
C1HYEN
: Hysteresis Control
0: Off
1: On
This is the hysteresis control bit and if set high will apply a limited amount of
hysteresis to the comparator, as specified in the Comparator Electrical Characteristics
table. The positive feedback induced by hysteresis reduces the effect of spurious
switching near the comparator threshold.
Comparator Interrupt
Each also possesses its own interrupt function. When any one of the output bit changes state, its
relevant interrupt flag will be set, and if the corresponding interrupt enable bit is set, then a jump
to its relevant interrupt vector will be executed. Note that it is the changing state of the C0OUT
or C1OUT bit and not the output pin which generates an interrupt. If the microcontroller is in the
SLEEP or IDLE Mode and the Comparator is enabled, then if the external input lines cause the
Comparator output to change state, the resulting generated interrupt flag will also generate a wake-
up. If it is required to disable a wake-up from occurring, then the interrupt flag should be first set
high before entering the SLEEP or IDLE Mode.
Programming Considerations
If the comparator is enabled, it will remain active when the microcontroller enters the SLEEP or
IDLE Mode, however as it will consume a certain amount of power, the user may wish to consider
disabling it before the SLEEP or IDLE Mode is entered.
As comparator pins are shared with normal I/O pins the I/O registers for these pins will be read as
zero (port control register is "1") or read as port data register value (port control register is "0") if the
comparator function is enabled.