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
Bit3 C0OS:Outputpathselect
0:C0Xpin
1:Internaluse
Thisisthecomparatoroutputpathselectcontrolbit.Ifthebitissetto0andthe
C0SELbitis1thecomparatoroutputisconnectedtoanexternalC0Xpin.Ifthebit
issetto1ortheC0SELbitis0thecomparatoroutputsignalisonlyusedinternally
bythedeviceallowingthesharedcomparatoroutputpintoretainitsnormalI/O
operation.
Bit2~1 Unimplemented,readas“0”
Bit0 C0HYEN:HysteresisControl
0:Off
1:On
Thisisthehysteresiscontrolbitandifsethighwillapplyalimitedamountof
hysteresistothecomparator,asspeciedintheComparatorElectricalCharacteristics
table.Thepositivefeedbackinducedbyhysteresisreducestheeffectofspurious
switchingnearthecomparatorthreshold.
CP1C Register
Bit 7 6 5 4 3 2 1 0
Name
C1SEL C1EN C1POL C1OUT C1OS — — C1HYEN
R/W R/W R/W R/W R R/W — — R/W
POR
1 0 0 0 0 — — 1
Bit7 C1SEL:SelectComparatorpinsorI/Opins
0:I/Opinselect
1:Comparatorpinselect
ThisistheComparatorpinorI/Opinselectbit.Ifthebitishighthecomparatorwill
beselectedandthetwocomparatorinputpinswillbeenabled.Asaresult,thesetwo
pinswilllosetheirI/Opinfunctions.Anypull-highcongurationoptionsassociated
withthecomparatorsharedpinswillalsobeautomaticallydisconnected.
Bit6 C1EN:ComparatorOn/Offcontrol
0:Off
1:On
ThisistheComparatoron/offcontrolbit.Ifthebitiszerothecomparatorwillbe
switchedoffandnopowerconsumedevenifanalogvoltagesareappliedtoitsinputs.
Forpowersensitiveapplicationsthisbitshouldbeclearedtozeroifthecomparatoris
notusedorbeforethedeviceenterstheSLEEPorIDLEmode.
Bit5 C1POL:Comparatoroutputpolarity
0:Outputnotinverted
1:Outputinverted
Thisisthecomparatorpolaritybit.IfthebitiszerothentheC1OUTbitwillreect
thenon-invertedoutputconditionofthecomparator.Ifthebitishighthecomparator
C1OUTbitwillbeinverted.
Bit4 C1OUT:Comparatoroutputbit
C1POL=0
0:C1+<C1-
1:C1+>C1-
C1POL=1
0:C1+>C1-
1:C1+<C1-
Thisbitstoresthecomparatoroutputbit.Thepolarityofthebitisdeterminedbythe
voltagesonthecomparatorinputsandbytheconditionoftheC1POLbit.