User`s guide

Rev. 1.10 58 November 14, 2014 Rev. 1.10 59 November 14, 2014
HT66FW2230
Wireless Charger A/D Flash 8-Bit MCU
TM Interrupts
ThetwodifferenttypesofTMshavetwointernalinterrupts,theinternalcomparatorAorcomparator
P,whichgenerateaTMinterruptwhenacomparematchconditionoccurs.WhenaTMinterruptis
generated,itcanbeusedtoclearthecounterandalsotochangethestateoftheTMoutputpin.
TM External Pins
EachoftheTMs,irrespectiveofwhattype,hasoneTMinputpin,withthelabelTCKn.TheTM
inputpin,isessentiallyaclocksourcefortheTMandisselectedusingtheTnCK2~TnCK0bitsin
theTMnC0register.ThisexternalTMinputpinallowsanexternalclocksourcetodrivetheinternal
TM.ThisexternalTMinputpinissharedwithotherfunctionsbutwillbeconnectedtotheinternal
TMifselectedusingtheTnCK2~TnCK0bits.TheTMinputpincanbechosentohaveeithera
risingorfallingactiveedge.
TheTMseachhaveoneormoreoutputpins.WhentheTMisintheCompareMatchOutputMode,
thesepinscanbecontrolledbytheTMtoswitchtoahighorlowlevelortotogglewhenacompare
matchsituationoccurs.TheexternalTPnoutputpinisalsothepinwheretheTMgeneratesthePWM
outputwaveform.AstheTMoutputpinsarepin-sharedwithotherfunction,theTMoutputfunction
mustrstbesetupusingregisters.Asinglebitinoneoftheregistersdeterminesifitsassociatedpin
istobeusedasanexternalTMoutputpinorifitistohaveanotherfunction.Thenumberofoutput
pinsforeachTMtypeisdifferent,thedetailsareprovidedintheaccompanyingtable.
CTMoutputpinnameshavea“_n”sufx.Pinnamesthatincludea“_0”or“_1”sufxindicate
thattheyarefromaTMwithmultipleoutputpins.ThisallowstheTMtogenerateacomplimentary
outputpair,selectedusingtheI/Oregisterdatabits.
TM0 TM1
TP0
TP1_0, TP1_1
TM Output Pins
TM Input/Output Pin Control Register
SelectingtohaveaTMinput/outputorwhethertoretainitsothersharedfunctionisimplemented
usingoneregister,withasinglebitineachregistercorrespondingtoaTMinput/outputpin.
Out put
C apture I nput
PB0/T CK0
TCK Input

 
PB4 O utput Function
0
1
PB4
1
0
1
0
PB4/T P0
PBS07~PBS06
PBS07~PBS06
TM0 Function Pin Control Block Diagram