Rev. 1.50 72 August 28, 2017 Rev. 1.50 73 August 28, 2017
HT66F0175/HT66F0185
A/D Flash MCU with EEPROM
HT66F0175/HT66F0185
A/D Flash MCU with EEPROM
TM Clock Source
TheclocksourcewhichdrivesthemaincounterineachTMcanoriginatefromvarioussources.
TheselectionoftherequiredclocksourceisimplementedusingtheTnCK2~TnCK0bitsintheTM
controlregisters.Theclocksourcecanbearatioofthesystemclock,f
SYS
,ortheinternalhighclock,
f
H
,thef
TBC
clocksourceortheexternalTCKnpin.TheTCKnpinclocksourceisusedtoallowan
externalsignaltodrivetheTMasanexternalclocksourceforeventcounting.
TM Interrupts
TheCompact,StandardorPeriodictypeTMhastwointernalinterrupts,oneforeachoftheinternal
comparatorAorcomparatorP,whichgenerateaTMinterruptwhenacomparematchcondition
occurs.WhenaTMinterruptisgenerated,itcanbeusedtoclearthecounterandalsotochangethe
stateoftheTMoutputpin.
TM External Pins
EachoftheTMs,irrespectiveofwhattype,hasoneTMinputpin,withthelabelTCKn.TheTM
inputpinisessentiallyaclocksourcefortheTMandisselectedusingtheTnCK2~TnCK0bitsin
theTMnC0register.ThisexternalTMinputpinallowsanexternalclocksourcetodrivetheinternal
TM.ThisexternalTMinputpinissharedwithotherfunctionsbutwillbeconnectedtotheinternal
TMifselectedusingtheTnCK2~TnCK0bits.TheTMinputpincanbechosentohaveeithera
risingorfallingactiveedge.TheTCKnpinisalsousedastheexternaltriggerinputpininsingle
pulseoutputmodefortheSTMandPTMrespectively.
TheTMseachhaveoneoutputpinwiththelabelTPn.WhentheTMisintheCompareMatch
OutputMode,thesepinscanbecontrolledbytheTMtoswitchtoahighorlowlevelortotoggle
whenacomparematchsituationoccurs.TheexternalTPnoutputpinisalsothepinwherethe
TMgeneratesthePWMoutputwaveform.TheTPnpinactsasaninputwhentheTMissetupto
operateintheCaptureInputMode.AstheTPnpinsarepin-sharedwithotherfunctions,theTPn
pinfunctionisenabledordisabledaccordingtotheinternalTMon/offcontrol,operationmodeand
outputcontrolsettings.WhenthecorrespondingTMcongurationselectstheTPnpintobeusedas
anoutputpin,theassociatedpinwillbesetupasanexternalTMoutputpin.IftheTMconguration
selectstheTPnpintobesetupasaninputpin,theinputsignalsuppliedontheassociatedpincan
bederivedfromanexternalsignalandotherpin-sharedoutputfunction.IftheTMconguration
determinesthattheTPnpinfunctionisnotused,theassociatedpinwillbecontrolledbyother
pin-sharedfunctions.ThedetailsoftheTPnpinforeachTMtypeanddeviceareprovidedinthe
accompanyingtable.
Device STM PTM CTM Register
HT66F0175 —
TCK0; TP0
TCK1; TP1
— TMPC
HT66F0185 TCK0; TP0 TCK1; TP1 TCK2; TP2 TMPC
TM External Pins