Rev. 1.50 80 August 28, 2017 Rev. 1.50 81 August 28, 2017
HT66F0175/HT66F0185
A/D Flash MCU with EEPROM
HT66F0175/HT66F0185
A/D Flash MCU with EEPROM
Bit3 TnOC:TPnOutputcontrol
CompareMatchOutputMode
0:Initiallow
1:Initialhigh
PWMOutputMode
0:Activelow
1:Activehigh
ThisistheoutputcontrolbitfortheTMnoutputpin.Itsoperationdependsupon
whetherTMnisbeingusedintheCompareMatchOutputModeorinthePWMMode.
IthasnoeffectiftheTMnisintheTimer/CounterMode.IntheCompareMatch
OutputModeitdeterminesthelogicleveloftheTMnoutputpinbeforeacompare
matchoccurs.InthePWMModeitdeterminesifthePWMsignalisactivehighor
activelow.
Bit2 TnPOL:TPnOutputpolaritycontrol
0:Non-inverted
1:Inverted
ThisbitcontrolsthepolarityoftheTPnoutputpin.WhenthebitissethightheTMn
outputpinwillbeinvertedandnotinvertedwhenthebitiszero.Ithasnoeffectifthe
TMnisintheTimer/CounterMode.
Bit1 TnDPX:TMnPWMduty/periodcontrol
0:CCRP–period;CCRA–duty
1:CCRP–duty;CCRA–period
ThisbitdetermineswhichoftheCCRAandCCRPregistersareusedforperiodand
dutycontrolofthePWMwaveform.
Bit0 TnCCLR:TMnCounterClearconditionselection
0:TMnComparatorPmatch
1:TMnComparatorAmatch
Thisbitisusedtoselectthemethodwhichclearsthecounter.Rememberthatthe
CompactTMcontainstwocomparators,ComparatorAandComparatorP,eitherof
whichcanbeselectedtocleartheinternalcounter.WiththeTnCCLRbitsethigh,
thecounterwillbeclearedwhenacomparematchoccursfromtheComparatorA.
Whenthebitislow,thecounterwillbeclearedwhenacomparematchoccursfrom
theComparatorPorwithacounteroverow.Acounteroverowclearingmethodcan
onlybeimplementediftheCCRPbitsareallclearedtozero.TheTnCCLRbitisnot
usedinthePWMMode.
TMnRP Register
Bit 7 6 5 4 3 2 1 0
Name TnRP7 TnRP6 TnRP5 TnRP4 TnRP3 TnRP2 TnRP1 TnRP0
R/W R/W R/W R/W R/W R/W R/W R/W R/W
POR 0 0 0 0 0 0 0 0
Bit7~0 TnRP7~TnRP0:TMnCCRP8-bitregister,comparedwiththeTMnCounterbit15~bit8
ComprartorPMatchPeriod
0:65535TMnclocks
1~255:256×(1~255)TMnclocks
TheseeightbitsareusedtosetupthevalueontheinternalCCRP8-bitregister,which
arethencomparedwiththeinternalcounter’shighesteightbits.Theresultofthis
comparisoncanbeselectedtocleartheinternalcounteriftheTnCCLRbitissetto
zero.SettingtheTnCCLRbittozeroensuresthatacomparematchwiththeCCRP
valueswillresettheinternalcounter.AstheCCRPbitsareonlycomparedwiththe
highesteightcounterbits,thecomparevaluesexistin256clockcyclemultiples.
Clearingallthreebitstozeroisineffectallowingthecountertooverflowatits
maximumvalue.