Rev. 1.71 84 April 11, 2017 Rev. 1.71 85 April 11, 2017
HT66F002/HT66F0025/HT66F003/HT66F004
Cost-Effective A/D Flash MCU with EEPROM
HT66F002/HT66F0025/HT66F003/HT66F004
Cost-Effective A/D Flash MCU with EEPROM
Periodic Type TM Register Description
OveralloperationofthePeriodicTMiscontrolledusingaseriesofregisters.Areadonlyregister
pairexiststostoretheinternalcounter10-bitvalue,whiletworead/writeregisterpairsexisttostore
theinternal10-bitCCRAandCCRPvalue.Theremainingtworegistersarecontrolregisterswhich
setupthedifferentoperatingandcontrolmodes.
Register
Name
Bit
7 6 5 4 3 2 1 0
PTMnC0 PTnPAU PTnCK2 PTnCKn PTnCK0 PTnON — — —
PTMnCn PTnM1 PTnM0 PTnIO1 PTnIO0 PTnOC PTnPOL PTnCKS PTnCCLR
PTMnDL D7 D6 D5 D4 D3 D2 D1 D0
PTMnDH — — — — — — D9 D8
PTMnAL D7 D6 D5 D4 D3 D2 D1 D0
PTMnAH — — — — — — D9 D8
PTMnRPL D7 D6 D5 D4 D3 D2 D1 D0
PTMnRPH — — — — — — D9 D8
10-bit Periodic TM Register List (n=0 or 1)
PTMnC0 Register
Bit 7 6 5 4 3 2 1 0
Name PTnPAU PTnCK2 PTnCK1 PTnCK0 PTnON — — —
R/W R/W R/W R/W R/W R/W — — —
POR 0 0 0 0 0 — — —
Bit7 PTnPAU:PTMCounterPauseControl
0:run
1:pause
Thecountercanbepausedbysettingthisbithigh.Clearingthebittozerorestoresnormal
counteroperation.WheninaPauseconditiontheTMwillremainpoweredupandcontinueto
consumepower.Thecounterwillretainitsresidualvaluewhenthisbitchangesfromlowtohigh
andresumecountingfromthisvaluewhenthebitchangestoalowvalueagain.
Bit6~4 PTnCK2~PTnCK0:SelectPTMCounterclock
000:f
SYS
/4
001:f
SYS
010:f
H
/16
011:f
H
/64
100:f
TBC
101:f
TBC
110:PTCKnrisingedgeclock
111:PTCKnfallingedgeclock
ThesethreebitsareusedtoselecttheclocksourcefortheTM.Theexternalpinclocksourcecan
bechosentobeactiveontherisingorfallingedge.Theclocksourcef
SYS
isthesystemclock,
whilef
TBC
isanotherinternalclock,thedetailsofwhichcanbefoundintheoscillatorsection.