Rev. 1.50 146 August 28, 2017 Rev. 1.50 147 August 28, 2017
HT66F0175/HT66F0185
A/D Flash MCU with EEPROM
HT66F0175/HT66F0185
A/D Flash MCU with EEPROM
CPC Register
Bit 7 6 5 4 3 2 1 0
Name CSEL CEN CPOL COUT COS CMPEG1 CMPEG0 CHYEN
R/W R/W R/W R/W R R/W R/W R/W R/W
POR 1 0 0 0 0 0 0 1
Bit7 CSEL:SelectComparatorpinsorI/Opins
0:I/Opinselected
1:ComparatorinputpinsC+andC-selected
ThisistheComparatorinputpinorI/Opinselectbit.Ifthebitishigh,thecomparator
inputpinswillbeenabled.Asaresult,thesetwopinswilllosetheirI/Opinfunctions.
Anypull-highcongurationoptionsassociatedwiththecomparatorsharedpinswill
alsobeautomaticallydisconnected.
Bit6 CEN:ComparatorON/Offcontrol
0:Off
1:On
ThisistheComparatoron/offcontrolbit.Ifthebitiszerothecomparatorwillbe
switchedoffandnopowerconsumedevenifanalogvoltagesareappliedtoitsinputs.
Forpowersensitiveapplicationsthisbitshouldbeclearedtozeroifthecomparatoris
notusedorbeforethedeviceenterstheSLEEPorIDLEmode.
Bit5 CPOL:ComparatorOutputpolarity
0:Outputnotinverted
1:Outputinverted
Thisisthecomparatorpolaritybit.IfthebitiszerothentheCOUTbitwillreect
thenon-invertedoutputconditionofthecomparator.Ifthebitishighthecomparator
COUTbitwillbeinverted.
Bit4 COUT:ComparatorOutputbit
CPOL=0
0:C+<C-
1:C+>C-
CPOL=1
0:C+>C-
1:C+<C-
Thisbitstoresthecomparatoroutputbit.Thepolarityofthebitisdeterminedbythe
voltagesonthecomparatorinputsandbytheconditionoftheCPOLbit.
Bit3 COS:ComparatorOutputpathselect
0:CXpinselected(compareoutputcanoutputtoCXpin)
1:I/Opinselected(compareoutputonlyinternaluse)
Bit2~1 CMPEG1~CMPEG0:Comparatoroutputinterrupttriggeredgeselect
00:risingedge→comparatorinterrupttriggersignalgeneratedifCOUTchanged
statefrom0to1
01:fallingedge→comparatorinterrupttriggersignalgeneratedifCOUTchanged
statefrom1to0
1x:bothedge→comparatorinterrupttriggersignalgeneratedifCOUTchanged
statefrom0to1or1to0
Bit0 CHYEN:ComparatorHysteresisfunctioncontrol
0:Off
1:On
Thisisthehysteresiscontrolbitandifsethighwillapplyalimitedamountof
hysteresistothecomparator,asspeciedintheComparatorElectricalCharacteristics
table.Thepositivefeedbackinducedbyhysteresisreducestheeffectofspurious
switchingnearthecomparatorthreshold.