Rev. 2.50 182 June 22, 2017 Rev. 2.50 183 June 22, 2017
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
Comparator Registers
Therearetworegistersforoverallcomparatoroperation,oneforeachcomparator.Ascorresponding
bitsinthetworegistershaveidenticalfunctions,theyfollowingregistertableappliestoboth
registers.
Register
Name
Bit
7 6 5 4 3 2 1 0
CP0C C0SEL C0EN C0POL C0OUT C0OS — — C0HYEN
CP1C C1SEL C1EN C1POL C1OUT C1OS — — C1HYEN
Comparator Registers List
CP0C Registe
Bit 7 6 5 4 3 2 1 0
Name C0SEL C0EN C0POL C0OUT C0OS — — C0HYEN
R/W R/W R/W R/W R R/W — — R/W
POR
1 0 0 0 0 — — 1
Bit7 C0SEL:SelectComparatorpinsorI/Opins
0:I/Opinselect
1:Comparatorpinselect
ThisistheComparatorpinorI/Opinselectbit.Ifthebitishighthecomparatorwill
beselectedandthetwocomparatorinputpinswillbeenabled.Asaresult,thesetwo
pinswilllosetheirI/Opinfunctions.Anypull-highcongurationoptionsassociated
withthecomparatorsharedpinswillalsobeautomaticallydisconnected.
Bit6 C0EN:ComparatorOn/Offcontrol
0:Off
1:On
ThisistheComparatoron/offcontrolbit.Ifthebitiszerothecomparatorwillbe
switchedoffandnopowerconsumedevenifanalogvoltagesareappliedtoitsinputs.
Forpowersensitiveapplicationsthisbitshouldbeclearedtozeroifthecomparatoris
notusedorbeforethedeviceenterstheSLEEPorIDLEmode.
Bit5 C0POL:Comparatoroutputpolarity
0:Outputnotinverted
1:Outputinverted
Thisisthecomparatorpolaritybit.IfthebitiszerothentheC0OUTbitwillreect
thenon-invertedoutputconditionofthecomparator.Ifthebitishighthecomparator
C0OUTbitwillbeinverted.
Bit4 C0OUT:Comparatoroutputbit
C0POL=0
0:C0+<C0-
1:C0+>C0-
C0POL=1
0:C0+>C0-
1:C0+<C0-
Thisbitstoresthecomparatoroutputbit.Thepolarityofthebitisdeterminedbythe
voltagesonthecomparatorinputsandbytheconditionoftheC0POLbit.