Rev. 2.50 114 June 22, 2017 Rev. 2.50 115 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
TMnC0 Register
Bit 7 6 5 4 3 2 1 0
Name TnPAU TnCK2
TnCK1 TnCK0 TnON 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 TnPAU:TMnCounterPauseControl
0:Run
1:Pause
Thecountercanbepausedbysettingthisbithigh.Clearingthebittozerorestores
normalcounteroperation.WheninaPauseconditiontheTMwillremainpoweredup
andcontinuetoconsumepower.Thecounterwillretainitsresidualvaluewhenthisbit
changesfromlowtohighandresumecountingfromthisvaluewhenthebitchanges
toalowvalueagain.
Bit6~4 TnCK2~TnCK0:SelectTMnCounterclock
000:f
SYS
/4
001:f
SYS
010:f
H
/16
011:f
H
/64
100:f
TBC
101:Undened
110:TCKnrisingedgeclock
111:TCKnfallingedgeclock
ThesethreebitsareusedtoselecttheclocksourcefortheTM.SelectingtheReserved
clockinputwilleffectivelydisabletheinternalcounter.Theexternalpinclocksource
canbechosentobeactiveontherisingorfallingedge.Theclocksourcef
SYS
isthe
systemclock,whilef
H
andf
TBC
areotherinternalclocks,thedetailsofwhichcanbe
foundintheoscillatorsection.
Bit3 TnON:TMnCounterOn/OffControl
0:Off
1:On
Thisbitcontrolstheoverallon/offfunctionoftheTM.Settingthebithighenablesthe
countertorun,clearingthebitdisablestheTM.Clearingthisbittozerowillstopthe
counterfromcountingandturnofftheTMwhichwillreduceitspowerconsumption.
Whenthebitchangesstatefromlowtohightheinternalcountervaluewillberesetto
zero,howeverwhenthebitchangesfromhightolow,theinternalcounterwillretain
itsresidualvalue.
IftheTMisintheCompareMatchOutputModethentheTMoutputpinwillbereset
toitsinitialcondition,asspeciedbytheTnOCbit,whentheTnONbitchangesfrom
lowtohigh.
Bit2~0
TnRP2~TnRP0:TMnCCRP3-bitregister,comparedwiththeTMnCounterbit9~bit7
ComparatorPMatchPeriod
000:1024TMnclocks
001:128TMnclocks
010:256TMnclocks
011:384TMnclocks
100:512TMnclocks
101:640TMnclocks
110:768TMnclocks
111:896TMnclocks
ThesethreebitsareusedtosetupthevalueontheinternalCCRP3-bitregister,which
arethencomparedwiththeinternalcounter'shighestthreebits.Theresultofthis
comparisoncanbeselectedtocleartheinternalcounteriftheTnCCLRbitissetto
zero.SettingtheTnCCLRbittozeroensuresthatacomparematchwiththeCCRP
valueswillresettheinternalcounter.AstheCCRPbitsareonlycomparedwiththe
highestthreecounterbits,thecomparevaluesexistin128clockcyclemultiples.
Clearingallthreebitstozeroisineffectallowingthecountertooverflowatits
maximumvalue.