User`s guide

Rev. 1.10 74 November 14, 2014 Rev. 1.10 75 November 14, 2014
HT66FW2230
Wireless Charger A/D Flash 8-Bit MCU
TM0outputpinchangesstatewhenacomparematchoccursfromtheComparatorA.
TheTM0outputpincanbesetuptoswitchhigh,switchlowortotoggleitspresent
statewhenacomparematchoccursfromtheComparatorA.Whenthebitsareboth
zero,thennochangewilltakeplaceontheoutput.TheinitialvalueoftheTM0output
pinshouldbesetupusingtheT0OCbitintheTM0C1register.Notethattheoutput
levelrequestedbytheT0IO1andT0IO0bitsmustbedifferentfromtheinitialvalue
setupusingtheT0OCbitotherwisenochangewilloccurontheTM0outputpinwhen
acomparematchoccurs.AftertheTM0outputpinchangesstateitcanberesettoits
initiallevelbychangingtheleveloftheT0ONbitfromlowtohigh.
InthePWMMode,theT0IO1andT0IO0bitsdeterminehowtheTMoutputpin
changesstatewhenacertaincomparematchconditionoccurs.ThePWMoutput
functionismodifiedbychangingthesetwobits.Itisnecessarytoonlychangethe
valuesoftheT0IO1andT0IO0bitsonlyaftertheTM0hasbeenswitchedoff.
UnpredictablePWMoutputswilloccuriftheT0IO1andT0IO0bitsarechangedwhen
theTMisrunning.
Bit3 T0OC: TP0Outputcontrolbit
CompareMatchOutputMode
0:Initiallow
1:Initialhigh
PWMMode//SinglePulseOutputMode
0:Activelow
1:Activehigh
ThisistheoutputcontrolbitfortheTM0outputpin.Itsoperationdependsuponwhether
TM0isbeingusedintheCompareMatchOutputModeorinthePWMMode/Single
PulseOutputMode.IthasnoeffectiftheTM0isintheTimer/CounterMode.Inthe
CompareMatchOutputModeitdeterminesthelogiclevelofheTM0outputpinbeforea
comparematchoccurs.InthePWMModeitdeterminesifthePWMsignalisactivehigh
oractivelow.
Bit2 T0POL:TP0OutputpolarityControl
0:Non-invert
1:Invert
ThisbitcontrolsthepolarityoftheTP0outputpin.WhenthebitissethightheTM0
outputpinwillbeinvertedandnotinvertedwhenthebitiszero.Ithasnoeffectifthe
TM0isintheTimer/CounterMode.
Bit1 T0DPX: TM0PWMperiod/dutyControl
0:CCRP-period;CCRA-duty
1:CCRP-duty;CCRA-period
Thisbit,determineswhichoftheCCRAandCCRPregistersareusedforperiodand
dutycontrolofthePWMwaveform.
Bit0 T0CCLR:SelectTM0Counterclearcondition
0:TM0ComparatorPmatch
1:TM0ComparatorAmatch
Thisbitisusedtoselectthemethodwhichclearsthecounter.Rememberthatthe
CompactTM0containstwocomparators,ComparatorAandComparatorP,eitherof
whichcanbeselectedtocleartheinternalcounter.WiththeT0CCLRbitsethigh,
thecounterwillbeclearedwhenacomparematchoccursfromtheComparatorA.
Whenthebitislow,thecounterwillbeclearedwhenacomparematchoccursfrom
theComparatorPorwithacounteroverow.Acounteroverowclearingmethodcan
onlybeimplementediftheCCRPbitsareallclearedtozero.TheT0CCLRbitisnot
usedinthePWMMode,SinglePulseorinputCaptureMode.